aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-08-14 01:15:15 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-14 18:30:02 -0400
commit0da6d7b331f391d3c0ce52fb5289f7edeb94e280 (patch)
tree64c88c526fbd81e7bbb4bbbf27474e420de2e4db /drivers/net/sky2.c
parent264bb4fab1a0952b4eef4df5b9e90bc050a2d1e6 (diff)
sky2: hold spinlock around phy_power_down
Avoid any possible problems with accessing PHY registers on shutdown. This is a purely theoretical issue and is not related to any of the outstanding bug reports. Since receiver and transmitter are already shutdown and phy interrupts for this device are already disabled, there should already be enough protection. Suggested by Mike McCormack. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index b75b48e83970..1d3ee03fa648 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1893,7 +1893,9 @@ static int sky2_down(struct net_device *dev)
1893 synchronize_irq(hw->pdev->irq); 1893 synchronize_irq(hw->pdev->irq);
1894 napi_synchronize(&hw->napi); 1894 napi_synchronize(&hw->napi);
1895 1895
1896 spin_lock_bh(&sky2->phy_lock);
1896 sky2_phy_power_down(hw, port); 1897 sky2_phy_power_down(hw, port);
1898 spin_unlock_bh(&sky2->phy_lock);
1897 1899
1898 /* turn off LED's */ 1900 /* turn off LED's */
1899 sky2_write16(hw, B0_Y2LED, LED_STAT_OFF); 1901 sky2_write16(hw, B0_Y2LED, LED_STAT_OFF);