From d15e9c4d9a75702b30e00cdf95c71c88e3f3f51e Mon Sep 17 00:00:00 2001 From: Francois Romieu Date: Sun, 17 Dec 2006 23:03:15 +0100 Subject: 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 Signed-off-by: Jeff Garzik --- drivers/net/8139cp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/net/8139cp.c') diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index 458dd9f830c..e2cb19b582a 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 */ } -- cgit v1.2.3