diff mbox

[kernel,2.6.35-rc3-git7] axnet_cs: local_irq_save before calling ei_irq_wrapper

Message ID 20100706202243.95319ab4.ken_kawasaki@spring.nifty.jp
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Ken Kawasaki July 6, 2010, 11:22 a.m. UTC
axnet_cs:
    local_irq_save before calling ei_irq_wrapper.


Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>

---

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller July 7, 2010, 9:51 p.m. UTC | #1
From: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Date: Tue, 6 Jul 2010 20:22:43 +0900

> 
> axnet_cs:
>     local_irq_save before calling ei_irq_wrapper.
> 
> 
> Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>

An interrupt handler may not assume that interrupts are disabled when
it is invoked.

The axnet_interrupt() code needs to be fixed to use
spin_lock_irqsave() et al.

Then, this change of your's is no longer needed.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- linux-2.6.35-git7/drivers/net/pcmcia/axnet_cs.c.orig	2010-07-04 08:28:15.000000000 +0900
+++ linux-2.6.35-git7/drivers/net/pcmcia/axnet_cs.c	2010-07-04 08:40:23.000000000 +0900
@@ -606,6 +606,7 @@  static void ei_watchdog(u_long arg)
     unsigned int nic_base = dev->base_addr;
     unsigned int mii_addr = nic_base + AXNET_MII_EEP;
     u_short link;
+    unsigned long flags;
 
     if (!netif_device_present(dev)) goto reschedule;
 
@@ -614,7 +615,10 @@  static void ei_watchdog(u_long arg)
     if (info->stale++ && (inb_p(nic_base + EN0_ISR) & ENISR_ALL)) {
 	if (!info->fast_poll)
 	    printk(KERN_INFO "%s: interrupt(s) dropped!\n", dev->name);
+	local_irq_save(flags);
 	ei_irq_wrapper(dev->irq, dev);
+	local_irq_restore(flags);
+
 	info->fast_poll = HZ;
     }
     if (info->fast_poll) {