aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/arm/at91_ether.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/arm/at91_ether.c')
-rw-r--r--drivers/net/arm/at91_ether.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c
index c8bc60a7040c..42230fc81e33 100644
--- a/drivers/net/arm/at91_ether.c
+++ b/drivers/net/arm/at91_ether.c
@@ -198,7 +198,9 @@ static irqreturn_t at91ether_phy_interrupt(int irq, void *dev_id)
198 struct net_device *dev = (struct net_device *) dev_id; 198 struct net_device *dev = (struct net_device *) dev_id;
199 struct at91_private *lp = netdev_priv(dev); 199 struct at91_private *lp = netdev_priv(dev);
200 unsigned int phy; 200 unsigned int phy;
201 unsigned long flags;
201 202
203 spin_lock_irqsave(&lp->lock, flags);
202 /* 204 /*
203 * This hander is triggered on both edges, but the PHY chips expect 205 * This hander is triggered on both edges, but the PHY chips expect
204 * level-triggering. We therefore have to check if the PHY actually has 206 * level-triggering. We therefore have to check if the PHY actually has
@@ -240,6 +242,7 @@ static irqreturn_t at91ether_phy_interrupt(int irq, void *dev_id)
240 242
241done: 243done:
242 disable_mdi(); 244 disable_mdi();
245 spin_unlock_irqrestore(&lp->lock, flags);
243 246
244 return IRQ_HANDLED; 247 return IRQ_HANDLED;
245} 248}
@@ -396,9 +399,11 @@ static void at91ether_check_link(unsigned long dev_id)
396 struct net_device *dev = (struct net_device *) dev_id; 399 struct net_device *dev = (struct net_device *) dev_id;
397 struct at91_private *lp = netdev_priv(dev); 400 struct at91_private *lp = netdev_priv(dev);
398 401
402 spin_lock_irq(&lp->lock);
399 enable_mdi(); 403 enable_mdi();
400 update_linkspeed(dev, 1); 404 update_linkspeed(dev, 1);
401 disable_mdi(); 405 disable_mdi();
406 spin_unlock_irq(&lp->lock);
402 407
403 mod_timer(&lp->check_timer, jiffies + LINK_POLL_INTERVAL); 408 mod_timer(&lp->check_timer, jiffies + LINK_POLL_INTERVAL);
404} 409}