diff options
author | Ken Kawasaki <ken_kawasaki@spring.nifty.jp> | 2010-07-09 21:18:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-12 23:13:02 -0400 |
commit | ab83a38958ae7e419f18fabe9b2954a6087bfe0d (patch) | |
tree | 8d12915d385d55c9cef5c0a878eb9ff6da5a8934 /drivers | |
parent | 336a283b9cbe47748ccd68fd8c5158f67cee644b (diff) |
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: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 5b3dfb4ab27..33525bf2a3d 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -1168,6 +1168,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) | |||
1168 | int interrupts, nr_serviced = 0, i; | 1168 | int interrupts, nr_serviced = 0, i; |
1169 | struct ei_device *ei_local; | 1169 | struct ei_device *ei_local; |
1170 | int handled = 0; | 1170 | int handled = 0; |
1171 | unsigned long flags; | ||
1171 | 1172 | ||
1172 | e8390_base = dev->base_addr; | 1173 | e8390_base = dev->base_addr; |
1173 | ei_local = netdev_priv(dev); | 1174 | ei_local = netdev_priv(dev); |
@@ -1176,7 +1177,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) | |||
1176 | * Protect the irq test too. | 1177 | * Protect the irq test too. |
1177 | */ | 1178 | */ |
1178 | 1179 | ||
1179 | spin_lock(&ei_local->page_lock); | 1180 | spin_lock_irqsave(&ei_local->page_lock, flags); |
1180 | 1181 | ||
1181 | if (ei_local->irqlock) | 1182 | if (ei_local->irqlock) |
1182 | { | 1183 | { |
@@ -1188,7 +1189,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) | |||
1188 | dev->name, inb_p(e8390_base + EN0_ISR), | 1189 | dev->name, inb_p(e8390_base + EN0_ISR), |
1189 | inb_p(e8390_base + EN0_IMR)); | 1190 | inb_p(e8390_base + EN0_IMR)); |
1190 | #endif | 1191 | #endif |
1191 | spin_unlock(&ei_local->page_lock); | 1192 | spin_unlock_irqrestore(&ei_local->page_lock, flags); |
1192 | return IRQ_NONE; | 1193 | return IRQ_NONE; |
1193 | } | 1194 | } |
1194 | 1195 | ||
@@ -1261,7 +1262,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) | |||
1261 | ei_local->irqlock = 0; | 1262 | ei_local->irqlock = 0; |
1262 | outb_p(ENISR_ALL, e8390_base + EN0_IMR); | 1263 | outb_p(ENISR_ALL, e8390_base + EN0_IMR); |
1263 | 1264 | ||
1264 | spin_unlock(&ei_local->page_lock); | 1265 | spin_unlock_irqrestore(&ei_local->page_lock, flags); |
1265 | return IRQ_RETVAL(handled); | 1266 | return IRQ_RETVAL(handled); |
1266 | } | 1267 | } |
1267 | 1268 | ||