diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2006-12-17 17:03:15 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-26 16:24:11 -0500 |
commit | d15e9c4d9a75702b30e00cdf95c71c88e3f3f51e (patch) | |
tree | e7ba1469eac6f732a7d2b9debc7713d8173dc0a2 /drivers/net/skge.c | |
parent | 79f3d3996f06ee339c6f173e573826eccd3914ab (diff) |
netpoll: drivers must not enable IRQ unconditionally in their NAPI handler
net/core/netpoll.c::netpoll_send_skb() calls the poll handler when
it is available. As netconsole can be used from almost any context,
IRQ must not be enabled blindly in the NAPI handler of a driver which
supports netpoll.
b57bd06655a028aba7b92e1c19c2093e7fcfb341 fixed the issue for the
8139too.c driver.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r-- | drivers/net/skge.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 8a39376f87dc..deedfd5f8226 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -2920,6 +2920,7 @@ static int skge_poll(struct net_device *dev, int *budget) | |||
2920 | struct skge_hw *hw = skge->hw; | 2920 | struct skge_hw *hw = skge->hw; |
2921 | struct skge_ring *ring = &skge->rx_ring; | 2921 | struct skge_ring *ring = &skge->rx_ring; |
2922 | struct skge_element *e; | 2922 | struct skge_element *e; |
2923 | unsigned long flags; | ||
2923 | int to_do = min(dev->quota, *budget); | 2924 | int to_do = min(dev->quota, *budget); |
2924 | int work_done = 0; | 2925 | int work_done = 0; |
2925 | 2926 | ||
@@ -2957,12 +2958,12 @@ static int skge_poll(struct net_device *dev, int *budget) | |||
2957 | if (work_done >= to_do) | 2958 | if (work_done >= to_do) |
2958 | return 1; /* not done */ | 2959 | return 1; /* not done */ |
2959 | 2960 | ||
2960 | spin_lock_irq(&hw->hw_lock); | 2961 | spin_lock_irqsave(&hw->hw_lock, flags); |
2961 | __netif_rx_complete(dev); | 2962 | __netif_rx_complete(dev); |
2962 | hw->intr_mask |= irqmask[skge->port]; | 2963 | hw->intr_mask |= irqmask[skge->port]; |
2963 | skge_write32(hw, B0_IMSK, hw->intr_mask); | 2964 | skge_write32(hw, B0_IMSK, hw->intr_mask); |
2964 | skge_read32(hw, B0_IMSK); | 2965 | skge_read32(hw, B0_IMSK); |
2965 | spin_unlock_irq(&hw->hw_lock); | 2966 | spin_unlock_irqrestore(&hw->hw_lock, flags); |
2966 | 2967 | ||
2967 | return 0; | 2968 | return 0; |
2968 | } | 2969 | } |