diff options
author | Yaniv Rosner <yaniv.rosner@broadcom.com> | 2010-09-01 05:51:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-01 13:44:31 -0400 |
commit | eb80ce740a7e1deda5bedb9b5df876ce84ac5bc2 (patch) | |
tree | 1072eeaa7b36311c24114c88b9235a180301ffd8 /drivers/net/bnx2x/bnx2x_link.c | |
parent | 8ca60a68a9fd61b4cf31b48d9c365b07e5588bbe (diff) |
bnx2x: Fix potential link issue In BCM8727 based boards
In BCM8727 based boards, setting default 10G link speed after link was
set to 1G may lead to link down issue. The problem was setting the right
value, but to the wrong registers
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/bnx2x_link.c')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_link.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c index 9b4e7b3261aa..cbacf8a7c65f 100644 --- a/drivers/net/bnx2x/bnx2x_link.c +++ b/drivers/net/bnx2x/bnx2x_link.c | |||
@@ -4239,8 +4239,10 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars) | |||
4239 | } else if ((params->req_line_speed == | 4239 | } else if ((params->req_line_speed == |
4240 | SPEED_AUTO_NEG) && | 4240 | SPEED_AUTO_NEG) && |
4241 | ((params->speed_cap_mask & | 4241 | ((params->speed_cap_mask & |
4242 | PORT_HW_CFG_SPEED_CAPABILITY_D0_1G))) { | 4242 | PORT_HW_CFG_SPEED_CAPABILITY_D0_1G)) && |
4243 | 4243 | ((params->speed_cap_mask & | |
4244 | PORT_HW_CFG_SPEED_CAPABILITY_D0_10G) != | ||
4245 | PORT_HW_CFG_SPEED_CAPABILITY_D0_10G)) { | ||
4244 | DP(NETIF_MSG_LINK, "Setting 1G clause37\n"); | 4246 | DP(NETIF_MSG_LINK, "Setting 1G clause37\n"); |
4245 | bnx2x_cl45_write(bp, params->port, ext_phy_type, | 4247 | bnx2x_cl45_write(bp, params->port, ext_phy_type, |
4246 | ext_phy_addr, MDIO_AN_DEVAD, | 4248 | ext_phy_addr, MDIO_AN_DEVAD, |
@@ -4253,17 +4255,18 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars) | |||
4253 | need to set the 10G registers although it is | 4255 | need to set the 10G registers although it is |
4254 | default */ | 4256 | default */ |
4255 | bnx2x_cl45_write(bp, params->port, ext_phy_type, | 4257 | bnx2x_cl45_write(bp, params->port, ext_phy_type, |
4256 | ext_phy_addr, MDIO_AN_DEVAD, | 4258 | ext_phy_addr, MDIO_AN_DEVAD, |
4257 | MDIO_AN_REG_CTRL, 0x0020); | 4259 | MDIO_AN_REG_8727_MISC_CTRL, |
4260 | 0x0020); | ||
4258 | bnx2x_cl45_write(bp, params->port, ext_phy_type, | 4261 | bnx2x_cl45_write(bp, params->port, ext_phy_type, |
4259 | ext_phy_addr, MDIO_AN_DEVAD, | 4262 | ext_phy_addr, MDIO_AN_DEVAD, |
4260 | 0x7, 0x0100); | 4263 | MDIO_AN_REG_CL37_AN, 0x0100); |
4261 | bnx2x_cl45_write(bp, params->port, ext_phy_type, | 4264 | bnx2x_cl45_write(bp, params->port, ext_phy_type, |
4262 | ext_phy_addr, MDIO_PMA_DEVAD, | 4265 | ext_phy_addr, MDIO_PMA_DEVAD, |
4263 | MDIO_PMA_REG_CTRL, 0x2040); | 4266 | MDIO_PMA_REG_CTRL, 0x2040); |
4264 | bnx2x_cl45_write(bp, params->port, ext_phy_type, | 4267 | bnx2x_cl45_write(bp, params->port, ext_phy_type, |
4265 | ext_phy_addr, MDIO_PMA_DEVAD, | 4268 | ext_phy_addr, MDIO_PMA_DEVAD, |
4266 | MDIO_PMA_REG_10G_CTRL2, 0x0008); | 4269 | MDIO_PMA_REG_10G_CTRL2, 0x0008); |
4267 | } | 4270 | } |
4268 | 4271 | ||
4269 | /* Set 2-wire transfer rate of SFP+ module EEPROM | 4272 | /* Set 2-wire transfer rate of SFP+ module EEPROM |