aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
authorYaniv Rosner <yanivr@broadcom.com>2012-04-03 21:28:58 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-04 18:24:23 -0400
commit9379c9be4b20d5cb7bde577f402b749cd7d3caa2 (patch)
tree16e4d95edfa8d196ef0fbfce718d95b0a16754e7 /drivers/net/ethernet/broadcom
parent25182fc22237f0fb1789c7ac9a79e871a1898ae5 (diff)
bnx2x: Restore 1G LED on BCM57712+BCM8727 designs.
Fix no-LED problem when link speed is 1G on BCM57712 + BCM8727 designs, by removing a logic error checking for a different PHY. 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/ethernet/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 1e2fea37eec9..1438da858678 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -6216,12 +6216,14 @@ int bnx2x_set_led(struct link_params *params,
6216 6216
6217 tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED); 6217 tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED);
6218 if (params->phy[EXT_PHY1].type == 6218 if (params->phy[EXT_PHY1].type ==
6219 PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54618SE) 6219 PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54618SE)
6220 EMAC_WR(bp, EMAC_REG_EMAC_LED, tmp & 0xfff1); 6220 tmp &= ~(EMAC_LED_1000MB_OVERRIDE |
6221 else { 6221 EMAC_LED_100MB_OVERRIDE |
6222 EMAC_WR(bp, EMAC_REG_EMAC_LED, 6222 EMAC_LED_10MB_OVERRIDE);
6223 (tmp | EMAC_LED_OVERRIDE)); 6223 else
6224 } 6224 tmp |= EMAC_LED_OVERRIDE;
6225
6226 EMAC_WR(bp, EMAC_REG_EMAC_LED, tmp);
6225 break; 6227 break;
6226 6228
6227 case LED_MODE_OPER: 6229 case LED_MODE_OPER:
@@ -6276,10 +6278,15 @@ int bnx2x_set_led(struct link_params *params,
6276 hw_led_mode); 6278 hw_led_mode);
6277 } else if ((params->phy[EXT_PHY1].type == 6279 } else if ((params->phy[EXT_PHY1].type ==
6278 PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54618SE) && 6280 PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54618SE) &&
6279 (mode != LED_MODE_OPER)) { 6281 (mode == LED_MODE_ON)) {
6280 REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, 0); 6282 REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, 0);
6281 tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED); 6283 tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED);
6282 EMAC_WR(bp, EMAC_REG_EMAC_LED, tmp | 0x3); 6284 EMAC_WR(bp, EMAC_REG_EMAC_LED, tmp |
6285 EMAC_LED_OVERRIDE | EMAC_LED_1000MB_OVERRIDE);
6286 /* Break here; otherwise, it'll disable the
6287 * intended override.
6288 */
6289 break;
6283 } else 6290 } else
6284 REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, 6291 REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4,
6285 hw_led_mode); 6292 hw_led_mode);
@@ -6294,13 +6301,9 @@ int bnx2x_set_led(struct link_params *params,
6294 LED_BLINK_RATE_VAL_E1X_E2); 6301 LED_BLINK_RATE_VAL_E1X_E2);
6295 REG_WR(bp, NIG_REG_LED_CONTROL_BLINK_RATE_ENA_P0 + 6302 REG_WR(bp, NIG_REG_LED_CONTROL_BLINK_RATE_ENA_P0 +
6296 port*4, 1); 6303 port*4, 1);
6297 if ((params->phy[EXT_PHY1].type != 6304 tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED);
6298 PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54618SE) && 6305 EMAC_WR(bp, EMAC_REG_EMAC_LED,
6299 (mode != LED_MODE_OPER)) { 6306 (tmp & (~EMAC_LED_OVERRIDE)));
6300 tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED);
6301 EMAC_WR(bp, EMAC_REG_EMAC_LED,
6302 (tmp & (~EMAC_LED_OVERRIDE)));
6303 }
6304 6307
6305 if (CHIP_IS_E1(bp) && 6308 if (CHIP_IS_E1(bp) &&
6306 ((speed == SPEED_2500) || 6309 ((speed == SPEED_2500) ||