diff options
author | Yaniv Rosner <yanivr@broadcom.com> | 2011-01-17 23:33:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-18 19:10:39 -0500 |
commit | f25b3c8b5f696cf74adfb37c9d9982c72f4106c9 (patch) | |
tree | 6616b75dd1d12248c59e56cb9f5341b1a041216e /drivers/net | |
parent | 791f18c0da3ad540806122e173d6b730d7d7f60b (diff) |
bnx2x: Fix BCM84823 LED behavior
Fix BCM84823 LED behavior which may show on some systems
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_link.c | 18 | ||||
-rw-r--r-- | drivers/net/bnx2x/bnx2x_reg.h | 4 |
2 files changed, 21 insertions, 1 deletions
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c index f5fd33ea097..bb1c81156d0 100644 --- a/drivers/net/bnx2x/bnx2x_link.c +++ b/drivers/net/bnx2x/bnx2x_link.c | |||
@@ -5972,10 +5972,26 @@ static void bnx2x_848xx_set_led(struct bnx2x *bp, | |||
5972 | MDIO_PMA_REG_8481_LED2_MASK, | 5972 | MDIO_PMA_REG_8481_LED2_MASK, |
5973 | 0x18); | 5973 | 0x18); |
5974 | 5974 | ||
5975 | /* Select activity source by Tx and Rx, as suggested by PHY AE */ | ||
5975 | bnx2x_cl45_write(bp, phy, | 5976 | bnx2x_cl45_write(bp, phy, |
5976 | MDIO_PMA_DEVAD, | 5977 | MDIO_PMA_DEVAD, |
5977 | MDIO_PMA_REG_8481_LED3_MASK, | 5978 | MDIO_PMA_REG_8481_LED3_MASK, |
5978 | 0x0040); | 5979 | 0x0006); |
5980 | |||
5981 | /* Select the closest activity blink rate to that in 10/100/1000 */ | ||
5982 | bnx2x_cl45_write(bp, phy, | ||
5983 | MDIO_PMA_DEVAD, | ||
5984 | MDIO_PMA_REG_8481_LED3_BLINK, | ||
5985 | 0); | ||
5986 | |||
5987 | bnx2x_cl45_read(bp, phy, | ||
5988 | MDIO_PMA_DEVAD, | ||
5989 | MDIO_PMA_REG_84823_CTL_LED_CTL_1, &val); | ||
5990 | val |= MDIO_PMA_REG_84823_LED3_STRETCH_EN; /* stretch_en for LED3*/ | ||
5991 | |||
5992 | bnx2x_cl45_write(bp, phy, | ||
5993 | MDIO_PMA_DEVAD, | ||
5994 | MDIO_PMA_REG_84823_CTL_LED_CTL_1, val); | ||
5979 | 5995 | ||
5980 | /* 'Interrupt Mask' */ | 5996 | /* 'Interrupt Mask' */ |
5981 | bnx2x_cl45_write(bp, phy, | 5997 | bnx2x_cl45_write(bp, phy, |
diff --git a/drivers/net/bnx2x/bnx2x_reg.h b/drivers/net/bnx2x/bnx2x_reg.h index 38ef7ca9f21..73efc9bbfe7 100644 --- a/drivers/net/bnx2x/bnx2x_reg.h +++ b/drivers/net/bnx2x/bnx2x_reg.h | |||
@@ -6194,7 +6194,11 @@ Theotherbitsarereservedandshouldbezero*/ | |||
6194 | #define MDIO_CTL_REG_84823_MEDIA_PRIORITY_COPPER 0x0000 | 6194 | #define MDIO_CTL_REG_84823_MEDIA_PRIORITY_COPPER 0x0000 |
6195 | #define MDIO_CTL_REG_84823_MEDIA_PRIORITY_FIBER 0x0100 | 6195 | #define MDIO_CTL_REG_84823_MEDIA_PRIORITY_FIBER 0x0100 |
6196 | #define MDIO_CTL_REG_84823_MEDIA_FIBER_1G 0x1000 | 6196 | #define MDIO_CTL_REG_84823_MEDIA_FIBER_1G 0x1000 |
6197 | #define MDIO_CTL_REG_84823_USER_CTRL_REG 0x4005 | ||
6198 | #define MDIO_CTL_REG_84823_USER_CTRL_CMS 0x0080 | ||
6197 | 6199 | ||
6200 | #define MDIO_PMA_REG_84823_CTL_LED_CTL_1 0xa8e3 | ||
6201 | #define MDIO_PMA_REG_84823_LED3_STRETCH_EN 0x0080 | ||
6198 | 6202 | ||
6199 | #define IGU_FUNC_BASE 0x0400 | 6203 | #define IGU_FUNC_BASE 0x0400 |
6200 | 6204 | ||