Commit 9379c9be authored by Yaniv Rosner's avatar Yaniv Rosner Committed by David S. Miller

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: default avatarYaniv Rosner <yanivr@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 25182fc2
...@@ -6216,12 +6216,14 @@ int bnx2x_set_led(struct link_params *params, ...@@ -6216,12 +6216,14 @@ int bnx2x_set_led(struct link_params *params,
tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED); tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED);
if (params->phy[EXT_PHY1].type == if (params->phy[EXT_PHY1].type ==
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54618SE) PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54618SE)
EMAC_WR(bp, EMAC_REG_EMAC_LED, tmp & 0xfff1); tmp &= ~(EMAC_LED_1000MB_OVERRIDE |
else { EMAC_LED_100MB_OVERRIDE |
EMAC_WR(bp, EMAC_REG_EMAC_LED, EMAC_LED_10MB_OVERRIDE);
(tmp | EMAC_LED_OVERRIDE)); else
} tmp |= EMAC_LED_OVERRIDE;
EMAC_WR(bp, EMAC_REG_EMAC_LED, tmp);
break; break;
case LED_MODE_OPER: case LED_MODE_OPER:
...@@ -6276,10 +6278,15 @@ int bnx2x_set_led(struct link_params *params, ...@@ -6276,10 +6278,15 @@ int bnx2x_set_led(struct link_params *params,
hw_led_mode); hw_led_mode);
} else if ((params->phy[EXT_PHY1].type == } else if ((params->phy[EXT_PHY1].type ==
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54618SE) && PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54618SE) &&
(mode != LED_MODE_OPER)) { (mode == LED_MODE_ON)) {
REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, 0); REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, 0);
tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED); tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED);
EMAC_WR(bp, EMAC_REG_EMAC_LED, tmp | 0x3); EMAC_WR(bp, EMAC_REG_EMAC_LED, tmp |
EMAC_LED_OVERRIDE | EMAC_LED_1000MB_OVERRIDE);
/* Break here; otherwise, it'll disable the
* intended override.
*/
break;
} else } else
REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4, REG_WR(bp, NIG_REG_LED_MODE_P0 + port*4,
hw_led_mode); hw_led_mode);
...@@ -6294,13 +6301,9 @@ int bnx2x_set_led(struct link_params *params, ...@@ -6294,13 +6301,9 @@ int bnx2x_set_led(struct link_params *params,
LED_BLINK_RATE_VAL_E1X_E2); LED_BLINK_RATE_VAL_E1X_E2);
REG_WR(bp, NIG_REG_LED_CONTROL_BLINK_RATE_ENA_P0 + REG_WR(bp, NIG_REG_LED_CONTROL_BLINK_RATE_ENA_P0 +
port*4, 1); port*4, 1);
if ((params->phy[EXT_PHY1].type != tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED);
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM54618SE) && EMAC_WR(bp, EMAC_REG_EMAC_LED,
(mode != LED_MODE_OPER)) { (tmp & (~EMAC_LED_OVERRIDE)));
tmp = EMAC_RD(bp, EMAC_REG_EMAC_LED);
EMAC_WR(bp, EMAC_REG_EMAC_LED,
(tmp & (~EMAC_LED_OVERRIDE)));
}
if (CHIP_IS_E1(bp) && if (CHIP_IS_E1(bp) &&
((speed == SPEED_2500) || ((speed == SPEED_2500) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment