diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2009-11-23 11:02:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-24 13:58:33 -0500 |
commit | dcf477b2d205abb8ccdb3b1cb668a0db2de202c0 (patch) | |
tree | 3d14a9fd53b62495fc61b2556ecbdf34f3c552fb /drivers | |
parent | 3eadb7b0ec39d7ee45804d691c96fa2fbc3745ee (diff) |
sfc: SFT9001: Reset LED configuration correctly after blinking
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/sfc/tenxpress.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c index 390b27b5ace9..19c78d281700 100644 --- a/drivers/net/sfc/tenxpress.c +++ b/drivers/net/sfc/tenxpress.c | |||
@@ -83,9 +83,9 @@ | |||
83 | #define PMA_PMD_LED_FLASH (3) | 83 | #define PMA_PMD_LED_FLASH (3) |
84 | #define PMA_PMD_LED_MASK 3 | 84 | #define PMA_PMD_LED_MASK 3 |
85 | /* All LEDs under hardware control */ | 85 | /* All LEDs under hardware control */ |
86 | #define PMA_PMD_LED_FULL_AUTO (0) | 86 | #define SFT9001_PMA_PMD_LED_DEFAULT 0 |
87 | /* Green and Amber under hardware control, Red off */ | 87 | /* Green and Amber under hardware control, Red off */ |
88 | #define PMA_PMD_LED_DEFAULT (PMA_PMD_LED_OFF << PMA_PMD_LED_RX_LBN) | 88 | #define SFX7101_PMA_PMD_LED_DEFAULT (PMA_PMD_LED_OFF << PMA_PMD_LED_RX_LBN) |
89 | 89 | ||
90 | #define PMA_PMD_SPEED_ENABLE_REG 49192 | 90 | #define PMA_PMD_SPEED_ENABLE_REG 49192 |
91 | #define PMA_PMD_100TX_ADV_LBN 1 | 91 | #define PMA_PMD_100TX_ADV_LBN 1 |
@@ -291,7 +291,7 @@ static int tenxpress_init(struct efx_nic *efx) | |||
291 | efx_mdio_set_flag(efx, MDIO_MMD_PMAPMD, PMA_PMD_LED_CTRL_REG, | 291 | efx_mdio_set_flag(efx, MDIO_MMD_PMAPMD, PMA_PMD_LED_CTRL_REG, |
292 | 1 << PMA_PMA_LED_ACTIVITY_LBN, true); | 292 | 1 << PMA_PMA_LED_ACTIVITY_LBN, true); |
293 | efx_mdio_write(efx, MDIO_MMD_PMAPMD, PMA_PMD_LED_OVERR_REG, | 293 | efx_mdio_write(efx, MDIO_MMD_PMAPMD, PMA_PMD_LED_OVERR_REG, |
294 | PMA_PMD_LED_DEFAULT); | 294 | SFX7101_PMA_PMD_LED_DEFAULT); |
295 | } | 295 | } |
296 | 296 | ||
297 | return 0; | 297 | return 0; |
@@ -624,7 +624,10 @@ void tenxpress_phy_blink(struct efx_nic *efx, bool blink) | |||
624 | (PMA_PMD_LED_FLASH << PMA_PMD_LED_RX_LBN) | | 624 | (PMA_PMD_LED_FLASH << PMA_PMD_LED_RX_LBN) | |
625 | (PMA_PMD_LED_FLASH << PMA_PMD_LED_LINK_LBN); | 625 | (PMA_PMD_LED_FLASH << PMA_PMD_LED_LINK_LBN); |
626 | else | 626 | else |
627 | reg = PMA_PMD_LED_DEFAULT; | 627 | if (efx->phy_type == PHY_TYPE_SFX7101) |
628 | reg = SFX7101_PMA_PMD_LED_DEFAULT; | ||
629 | else | ||
630 | reg = SFT9001_PMA_PMD_LED_DEFAULT; | ||
628 | 631 | ||
629 | efx_mdio_write(efx, MDIO_MMD_PMAPMD, PMA_PMD_LED_OVERR_REG, reg); | 632 | efx_mdio_write(efx, MDIO_MMD_PMAPMD, PMA_PMD_LED_OVERR_REG, reg); |
630 | } | 633 | } |