aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/8139cp.c
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2006-12-17 17:03:15 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-26 16:24:11 -0500
commitd15e9c4d9a75702b30e00cdf95c71c88e3f3f51e (patch)
treee7ba1469eac6f732a7d2b9debc7713d8173dc0a2 /drivers/net/8139cp.c
parent79f3d3996f06ee339c6f173e573826eccd3914ab (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/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:
617 * this round of polling 617 * this round of polling
618 */ 618 */
619 if (rx_work) { 619 if (rx_work) {
620 unsigned long flags;
621
620 if (cpr16(IntrStatus) & cp_rx_intr_mask) 622 if (cpr16(IntrStatus) & cp_rx_intr_mask)
621 goto rx_status_loop; 623 goto rx_status_loop;
622 624
623 local_irq_disable(); 625 local_irq_save(flags);
624 cpw16_f(IntrMask, cp_intr_mask); 626 cpw16_f(IntrMask, cp_intr_mask);
625 __netif_rx_complete(dev); 627 __netif_rx_complete(dev);
626 local_irq_enable(); 628 local_irq_restore(flags);
627 629
628 return 0; /* done */ 630 return 0; /* done */
629 } 631 }