aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/8139cp.c
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2006-12-17 23:03:15 +0100
committerJeff Garzik <jeff@garzik.org>2006-12-26 16:24:11 -0500
commitd15e9c4d9a75702b30e00cdf95c71c88e3f3f51e (patch)
treee7ba1469eac6f732a7d2b9debc7713d8173dc0a2 /drivers/net/8139cp.c
parent[PATCH] e1000: No-delay link detection at interface up (diff)
downloadlinux-dev-d15e9c4d9a75702b30e00cdf95c71c88e3f3f51e.tar.xz
linux-dev-d15e9c4d9a75702b30e00cdf95c71c88e3f3f51e.zip
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/8139cp.c')
-rw-r--r--drivers/net/8139cp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 458dd9f830c4..e2cb19b582a1 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -617,13 +617,15 @@ rx_next:
* this round of polling
*/
if (rx_work) {
+ unsigned long flags;
+
if (cpr16(IntrStatus) & cp_rx_intr_mask)
goto rx_status_loop;
- local_irq_disable();
+ local_irq_save(flags);
cpw16_f(IntrMask, cp_intr_mask);
__netif_rx_complete(dev);
- local_irq_enable();
+ local_irq_restore(flags);
return 0; /* done */
}