diff options
author | Yaniv Rosner <yanivr@broadcom.com> | 2011-08-02 18:59:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-03 06:22:18 -0400 |
commit | fd38f73eb936f9d9f28e4f7ff598cc0780e09424 (patch) | |
tree | eaac9c2348643759dac81665f3de124d8752865b /drivers/net/bnx2x | |
parent | 19af03a3c8cb1e07e31c070dfde9fac2e5e7796c (diff) |
bnx2x: Fix BCM84833 link
BCM84833 fail to link due to incorrect auto-negotiation setting.
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 | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c index 6a3fdf8ace8d..cf8b8d13ab6c 100644 --- a/drivers/net/bnx2x/bnx2x_link.c +++ b/drivers/net/bnx2x/bnx2x_link.c | |||
@@ -9268,7 +9268,13 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy, | |||
9268 | if (phy->req_duplex == DUPLEX_FULL) | 9268 | if (phy->req_duplex == DUPLEX_FULL) |
9269 | autoneg_val |= (1<<8); | 9269 | autoneg_val |= (1<<8); |
9270 | 9270 | ||
9271 | bnx2x_cl45_write(bp, phy, | 9271 | /* |
9272 | * Always write this if this is not 84833. | ||
9273 | * For 84833, write it only when it's a forced speed. | ||
9274 | */ | ||
9275 | if ((phy->type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) || | ||
9276 | ((autoneg_val & (1<<12)) == 0)) | ||
9277 | bnx2x_cl45_write(bp, phy, | ||
9272 | MDIO_AN_DEVAD, | 9278 | MDIO_AN_DEVAD, |
9273 | MDIO_AN_REG_8481_LEGACY_MII_CTRL, autoneg_val); | 9279 | MDIO_AN_REG_8481_LEGACY_MII_CTRL, autoneg_val); |
9274 | 9280 | ||
@@ -9282,13 +9288,12 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy, | |||
9282 | bnx2x_cl45_write(bp, phy, | 9288 | bnx2x_cl45_write(bp, phy, |
9283 | MDIO_AN_DEVAD, MDIO_AN_REG_CTRL, | 9289 | MDIO_AN_DEVAD, MDIO_AN_REG_CTRL, |
9284 | 0x3200); | 9290 | 0x3200); |
9285 | } else if (phy->req_line_speed != SPEED_10 && | 9291 | } else |
9286 | phy->req_line_speed != SPEED_100) { | ||
9287 | bnx2x_cl45_write(bp, phy, | 9292 | bnx2x_cl45_write(bp, phy, |
9288 | MDIO_AN_DEVAD, | 9293 | MDIO_AN_DEVAD, |
9289 | MDIO_AN_REG_8481_10GBASE_T_AN_CTRL, | 9294 | MDIO_AN_REG_8481_10GBASE_T_AN_CTRL, |
9290 | 1); | 9295 | 1); |
9291 | } | 9296 | |
9292 | /* Save spirom version */ | 9297 | /* Save spirom version */ |
9293 | bnx2x_save_848xx_spirom_version(phy, params); | 9298 | bnx2x_save_848xx_spirom_version(phy, params); |
9294 | 9299 | ||
@@ -9781,11 +9786,9 @@ static void bnx2x_848x3_link_reset(struct bnx2x_phy *phy, | |||
9781 | bnx2x_cl45_read(bp, phy, | 9786 | bnx2x_cl45_read(bp, phy, |
9782 | MDIO_CTL_DEVAD, | 9787 | MDIO_CTL_DEVAD, |
9783 | 0x400f, &val16); | 9788 | 0x400f, &val16); |
9784 | /* Put to low power mode on newer FW */ | 9789 | bnx2x_cl45_write(bp, phy, |
9785 | if ((val16 & 0x303f) > 0x1009) | 9790 | MDIO_PMA_DEVAD, |
9786 | bnx2x_cl45_write(bp, phy, | 9791 | MDIO_PMA_REG_CTRL, 0x800); |
9787 | MDIO_PMA_DEVAD, | ||
9788 | MDIO_PMA_REG_CTRL, 0x800); | ||
9789 | } | 9792 | } |
9790 | } | 9793 | } |
9791 | 9794 | ||