aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2009-08-31 03:31:41 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-01 20:40:35 -0400
commit10547ae2c01acdace636e23c991b21fef05428b4 (patch)
tree1ed8172d59c93c533791bb338ba45d4541bde9e1 /drivers/net/sky2.c
parent89f56d1e91cfa535ccc6cc60e9e12e02682fd972 (diff)
sky2: fix management of driver LED
Observed by Mike McCormack. The LED bit here is just a software controlled value used to turn on one of the LED's on some boards. The register value was wrong, which could have been causing some power control issues. Get rid of problematic define use the correct mask. 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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index c7c0a5b7b53a..ba5180a23264 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -256,6 +256,9 @@ static void sky2_power_on(struct sky2_hw *hw)
256 256
257 sky2_read32(hw, B2_GP_IO); 257 sky2_read32(hw, B2_GP_IO);
258 } 258 }
259
260 /* Turn on "driver loaded" LED */
261 sky2_write16(hw, B0_CTST, Y2_LED_STAT_ON);
259} 262}
260 263
261static void sky2_power_aux(struct sky2_hw *hw) 264static void sky2_power_aux(struct sky2_hw *hw)
@@ -274,6 +277,9 @@ static void sky2_power_aux(struct sky2_hw *hw)
274 sky2_write8(hw, B0_POWER_CTRL, 277 sky2_write8(hw, B0_POWER_CTRL,
275 (PC_VAUX_ENA | PC_VCC_ENA | 278 (PC_VAUX_ENA | PC_VCC_ENA |
276 PC_VAUX_ON | PC_VCC_OFF)); 279 PC_VAUX_ON | PC_VCC_OFF));
280
281 /* turn off "driver loaded LED" */
282 sky2_write16(hw, B0_CTST, Y2_LED_STAT_OFF);
277} 283}
278 284
279static void sky2_gmac_reset(struct sky2_hw *hw, unsigned port) 285static void sky2_gmac_reset(struct sky2_hw *hw, unsigned port)
@@ -1867,9 +1873,6 @@ static int sky2_down(struct net_device *dev)
1867 sky2_phy_power_down(hw, port); 1873 sky2_phy_power_down(hw, port);
1868 spin_unlock_bh(&sky2->phy_lock); 1874 spin_unlock_bh(&sky2->phy_lock);
1869 1875
1870 /* turn off LED's */
1871 sky2_write16(hw, B0_Y2LED, LED_STAT_OFF);
1872
1873 sky2_tx_reset(hw, port); 1876 sky2_tx_reset(hw, port);
1874 1877
1875 /* Free any pending frames stuck in HW queue */ 1878 /* Free any pending frames stuck in HW queue */
@@ -2983,8 +2986,6 @@ static void sky2_reset(struct sky2_hw *hw)
2983 sky2_write8(hw, B2_TI_CTRL, TIM_STOP); 2986 sky2_write8(hw, B2_TI_CTRL, TIM_STOP);
2984 sky2_write8(hw, B2_TI_CTRL, TIM_CLR_IRQ); 2987 sky2_write8(hw, B2_TI_CTRL, TIM_CLR_IRQ);
2985 2988
2986 sky2_write8(hw, B0_Y2LED, LED_STAT_ON);
2987
2988 /* Turn off descriptor polling */ 2989 /* Turn off descriptor polling */
2989 sky2_write32(hw, B28_DPT_CTRL, DPT_STOP); 2990 sky2_write32(hw, B28_DPT_CTRL, DPT_STOP);
2990 2991
@@ -4601,7 +4602,6 @@ static void __devexit sky2_remove(struct pci_dev *pdev)
4601 4602
4602 sky2_power_aux(hw); 4603 sky2_power_aux(hw);
4603 4604
4604 sky2_write16(hw, B0_Y2LED, LED_STAT_OFF);
4605 sky2_write8(hw, B0_CTST, CS_RST_SET); 4605 sky2_write8(hw, B0_CTST, CS_RST_SET);
4606 sky2_read8(hw, B0_CTST); 4606 sky2_read8(hw, B0_CTST);
4607 4607