Commit ab83a389 authored by Ken Kawasaki's avatar Ken Kawasaki Committed by David S. Miller

axnet_cs: use spin_lock_irqsave in ax_interrupt

Use spin_lock_irqsave instead of spin_lock in ax_interrupt because
the interrupt handler can also be invoked from ei_watchdog.
Signed-off-by: default avatarKen Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 336a283b
...@@ -1168,6 +1168,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) ...@@ -1168,6 +1168,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id)
int interrupts, nr_serviced = 0, i; int interrupts, nr_serviced = 0, i;
struct ei_device *ei_local; struct ei_device *ei_local;
int handled = 0; int handled = 0;
unsigned long flags;
e8390_base = dev->base_addr; e8390_base = dev->base_addr;
ei_local = netdev_priv(dev); ei_local = netdev_priv(dev);
...@@ -1176,7 +1177,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) ...@@ -1176,7 +1177,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id)
* Protect the irq test too. * Protect the irq test too.
*/ */
spin_lock(&ei_local->page_lock); spin_lock_irqsave(&ei_local->page_lock, flags);
if (ei_local->irqlock) if (ei_local->irqlock)
{ {
...@@ -1188,7 +1189,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) ...@@ -1188,7 +1189,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id)
dev->name, inb_p(e8390_base + EN0_ISR), dev->name, inb_p(e8390_base + EN0_ISR),
inb_p(e8390_base + EN0_IMR)); inb_p(e8390_base + EN0_IMR));
#endif #endif
spin_unlock(&ei_local->page_lock); spin_unlock_irqrestore(&ei_local->page_lock, flags);
return IRQ_NONE; return IRQ_NONE;
} }
...@@ -1261,7 +1262,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) ...@@ -1261,7 +1262,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id)
ei_local->irqlock = 0; ei_local->irqlock = 0;
outb_p(ENISR_ALL, e8390_base + EN0_IMR); outb_p(ENISR_ALL, e8390_base + EN0_IMR);
spin_unlock(&ei_local->page_lock); spin_unlock_irqrestore(&ei_local->page_lock, flags);
return IRQ_RETVAL(handled); return IRQ_RETVAL(handled);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment