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

bnx2x: Fix BCM84833 link

BCM84833 fail to link due to incorrect auto-negotiation setting.
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 19af03a3
...@@ -9268,6 +9268,12 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy, ...@@ -9268,6 +9268,12 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy,
if (phy->req_duplex == DUPLEX_FULL) if (phy->req_duplex == DUPLEX_FULL)
autoneg_val |= (1<<8); autoneg_val |= (1<<8);
/*
* Always write this if this is not 84833.
* For 84833, write it only when it's a forced speed.
*/
if ((phy->type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) ||
((autoneg_val & (1<<12)) == 0))
bnx2x_cl45_write(bp, phy, bnx2x_cl45_write(bp, phy,
MDIO_AN_DEVAD, MDIO_AN_DEVAD,
MDIO_AN_REG_8481_LEGACY_MII_CTRL, autoneg_val); MDIO_AN_REG_8481_LEGACY_MII_CTRL, autoneg_val);
...@@ -9282,13 +9288,12 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy, ...@@ -9282,13 +9288,12 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy,
bnx2x_cl45_write(bp, phy, bnx2x_cl45_write(bp, phy,
MDIO_AN_DEVAD, MDIO_AN_REG_CTRL, MDIO_AN_DEVAD, MDIO_AN_REG_CTRL,
0x3200); 0x3200);
} else if (phy->req_line_speed != SPEED_10 && } else
phy->req_line_speed != SPEED_100) {
bnx2x_cl45_write(bp, phy, bnx2x_cl45_write(bp, phy,
MDIO_AN_DEVAD, MDIO_AN_DEVAD,
MDIO_AN_REG_8481_10GBASE_T_AN_CTRL, MDIO_AN_REG_8481_10GBASE_T_AN_CTRL,
1); 1);
}
/* Save spirom version */ /* Save spirom version */
bnx2x_save_848xx_spirom_version(phy, params); bnx2x_save_848xx_spirom_version(phy, params);
...@@ -9781,8 +9786,6 @@ static void bnx2x_848x3_link_reset(struct bnx2x_phy *phy, ...@@ -9781,8 +9786,6 @@ static void bnx2x_848x3_link_reset(struct bnx2x_phy *phy,
bnx2x_cl45_read(bp, phy, bnx2x_cl45_read(bp, phy,
MDIO_CTL_DEVAD, MDIO_CTL_DEVAD,
0x400f, &val16); 0x400f, &val16);
/* Put to low power mode on newer FW */
if ((val16 & 0x303f) > 0x1009)
bnx2x_cl45_write(bp, phy, bnx2x_cl45_write(bp, phy,
MDIO_PMA_DEVAD, MDIO_PMA_DEVAD,
MDIO_PMA_REG_CTRL, 0x800); MDIO_PMA_REG_CTRL, 0x800);
......
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