diff options
-rw-r--r-- | drivers/net/sky2.c | 5 | ||||
-rw-r--r-- | include/linux/netdevice.h | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 2253140ff4dc..f56de9894208 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -1961,10 +1961,11 @@ static irqreturn_t sky2_intr(int irq, void *dev_id, struct pt_regs *regs) if (status & Y2_IS_STAT_BMU) { hw->intr_mask &= ~Y2_IS_STAT_BMU; sky2_write32(hw, B0_IMSK, hw->intr_mask); - prefetch(&hw->st_le[hw->st_idx]); - if (netif_rx_schedule_test(dev0)) + if (likely(__netif_rx_schedule_prep(dev0))) { + prefetch(&hw->st_le[hw->st_idx]); __netif_rx_schedule(dev0); + } } if (status & Y2_IS_IRQ_PHY1) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 07e114d48bbb..7fda03d338d1 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -802,16 +802,16 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) return (1 << debug_value) - 1; } -/* Schedule rx intr now? */ -static inline int netif_rx_schedule_test(struct net_device *dev) +/* Test if receive needs to be scheduled */ +static inline int __netif_rx_schedule_prep(struct net_device *dev) { return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); } -/* Schedule only if device is up */ +/* Test if receive needs to be scheduled but only if up */ static inline int netif_rx_schedule_prep(struct net_device *dev) { - return netif_running(dev) && netif_rx_schedule_test(dev); + return netif_running(dev) && __netif_rx_schedule_prep(dev); } /* Add interface to tail of rx poll list. This assumes that _prep has |