diff options
author | Yaniv Rosner <yanivr@broadcom.com> | 2011-08-02 18:59:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-03 06:22:17 -0400 |
commit | 793bd450370bf85cd63cccaff5e2f1a62908a52f (patch) | |
tree | c7fe42c8222837dce3b763992cbc6e177b8e70e2 /drivers/net/bnx2x | |
parent | 157fa283a7cb5bc6a55dd4e0daf6eeef66adf354 (diff) |
bnx2x: Fix LED behavior
This fix resolve two problems seen regarding LED:
1. LED doesn't flash during port identification.
2. Traffic LED sometimes do not blink.
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/bnx2x')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_link.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c index 45255bdc5136..d8f6eff2d6b4 100644 --- a/drivers/net/bnx2x/bnx2x_link.c +++ b/drivers/net/bnx2x/bnx2x_link.c | |||
@@ -5922,20 +5922,30 @@ int bnx2x_set_led(struct link_params *params, | |||
5922 | tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED); | 5922 | tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED); |
5923 | EMAC_WR(bp, EMAC_REG_EMAC_LED, | 5923 | EMAC_WR(bp, EMAC_REG_EMAC_LED, |
5924 | (tmp | EMAC_LED_OVERRIDE)); | 5924 | (tmp | EMAC_LED_OVERRIDE)); |
5925 | return rc; | 5925 | /* |
5926 | * return here without enabling traffic | ||
5927 | * LED blink andsetting rate in ON mode. | ||
5928 | * In oper mode, enabling LED blink | ||
5929 | * and setting rate is needed. | ||
5930 | */ | ||
5931 | if (mode == LED_MODE_ON) | ||
5932 | return rc; | ||
5926 | } | 5933 | } |
5927 | } else if (SINGLE_MEDIA_DIRECT(params) && | 5934 | } else if (SINGLE_MEDIA_DIRECT(params)) { |
5928 | (CHIP_IS_E1x(bp) || | ||
5929 | CHIP_IS_E2(bp))) { | ||
5930 | /* | 5935 | /* |
5931 | * This is a work-around for HW issue found when link | 5936 | * This is a work-around for HW issue found when link |
5932 | * is up in CL73 | 5937 | * is up in CL73 |
5933 | */ | 5938 | */ |
5934 | REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, 0); | ||
5935 | REG_WR(bp, NIG_REG_LED_10G_P0 + port*4, 1); | 5939 | REG_WR(bp, NIG_REG_LED_10G_P0 + port*4, 1); |
5936 | } else { | 5940 | if (CHIP_IS_E1x(bp) || |
5941 | CHIP_IS_E2(bp) || | ||
5942 | (mode == LED_MODE_ON)) | ||
5943 | REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, 0); | ||
5944 | else | ||
5945 | REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, | ||
5946 | hw_led_mode); | ||
5947 | } else | ||
5937 | REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, hw_led_mode); | 5948 | REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, hw_led_mode); |
5938 | } | ||
5939 | 5949 | ||
5940 | REG_WR(bp, NIG_REG_LED_CONTROL_OVERRIDE_TRAFFIC_P0 + port*4, 0); | 5950 | REG_WR(bp, NIG_REG_LED_CONTROL_OVERRIDE_TRAFFIC_P0 + port*4, 0); |
5941 | /* Set blinking rate to ~15.9Hz */ | 5951 | /* Set blinking rate to ~15.9Hz */ |