Commit bd5a9346 authored by Komuro's avatar Komuro Committed by David S. Miller

axnet_cs: use spin_lock_irqsave instead of spin_lock + disable_irq

Signed-off-by: default avatarKomuro <komurojun-mbn@nifty.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 2eab17ab
...@@ -1040,15 +1040,13 @@ void ei_tx_timeout(struct net_device *dev) ...@@ -1040,15 +1040,13 @@ void ei_tx_timeout(struct net_device *dev)
/* Ugly but a reset can be slow, yet must be protected */ /* Ugly but a reset can be slow, yet must be protected */
disable_irq_nosync(dev->irq); spin_lock_irqsave(&ei_local->page_lock, flags);
spin_lock(&ei_local->page_lock);
/* Try to restart the card. Perhaps the user has fixed something. */ /* Try to restart the card. Perhaps the user has fixed something. */
ei_reset_8390(dev); ei_reset_8390(dev);
AX88190_init(dev, 1); AX88190_init(dev, 1);
spin_unlock(&ei_local->page_lock); spin_unlock_irqrestore(&ei_local->page_lock, flags);
enable_irq(dev->irq);
netif_wake_queue(dev); netif_wake_queue(dev);
} }
...@@ -1085,9 +1083,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1085,9 +1083,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
* Slow phase with lock held. * Slow phase with lock held.
*/ */
disable_irq_nosync(dev->irq); spin_lock_irqsave(&ei_local->page_lock, flags);
spin_lock(&ei_local->page_lock);
ei_local->irqlock = 1; ei_local->irqlock = 1;
...@@ -1125,8 +1121,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1125,8 +1121,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
ei_local->irqlock = 0; ei_local->irqlock = 0;
netif_stop_queue(dev); netif_stop_queue(dev);
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);
enable_irq(dev->irq);
ei_local->stat.tx_errors++; ei_local->stat.tx_errors++;
return 1; return 1;
} }
...@@ -1172,8 +1167,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1172,8 +1167,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
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);
enable_irq(dev->irq);
dev_kfree_skb (skb); dev_kfree_skb (skb);
ei_local->stat.tx_bytes += send_length; ei_local->stat.tx_bytes += send_length;
......
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