diff options
author | Yaniv Rosner <yanivr@broadcom.com> | 2012-10-31 01:46:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-01 11:31:52 -0400 |
commit | a75bb0010026f39910cd01d33a5baa47191539a0 (patch) | |
tree | 294cdd358fdb7d338bfbdf9effdb301ac5fe6008 /drivers/net | |
parent | b457bcb97212c38154d941d88c13f5f63f3620d0 (diff) |
bnx2x: Fix link down in 57712 following LFA
In case of link flap avoidance between PXE boot and bnx2x, set the appropriate
PHY DEVAD even if LFA kicks in.
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c index 290e12a8d024..f2436ea641a6 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | |||
@@ -3295,6 +3295,21 @@ static void bnx2x_serdes_deassert(struct bnx2x *bp, u8 port) | |||
3295 | DEFAULT_PHY_DEV_ADDR); | 3295 | DEFAULT_PHY_DEV_ADDR); |
3296 | } | 3296 | } |
3297 | 3297 | ||
3298 | static void bnx2x_xgxs_specific_func(struct bnx2x_phy *phy, | ||
3299 | struct link_params *params, | ||
3300 | u32 action) | ||
3301 | { | ||
3302 | struct bnx2x *bp = params->bp; | ||
3303 | switch (action) { | ||
3304 | case PHY_INIT: | ||
3305 | /* Set correct devad */ | ||
3306 | REG_WR(bp, NIG_REG_XGXS0_CTRL_MD_ST + params->port*0x18, 0); | ||
3307 | REG_WR(bp, NIG_REG_XGXS0_CTRL_MD_DEVAD + params->port*0x18, | ||
3308 | phy->def_md_devad); | ||
3309 | break; | ||
3310 | } | ||
3311 | } | ||
3312 | |||
3298 | static void bnx2x_xgxs_deassert(struct link_params *params) | 3313 | static void bnx2x_xgxs_deassert(struct link_params *params) |
3299 | { | 3314 | { |
3300 | struct bnx2x *bp = params->bp; | 3315 | struct bnx2x *bp = params->bp; |
@@ -3309,10 +3324,8 @@ static void bnx2x_xgxs_deassert(struct link_params *params) | |||
3309 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_3_CLEAR, val); | 3324 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_3_CLEAR, val); |
3310 | udelay(500); | 3325 | udelay(500); |
3311 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_3_SET, val); | 3326 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_3_SET, val); |
3312 | 3327 | bnx2x_xgxs_specific_func(¶ms->phy[INT_PHY], params, | |
3313 | REG_WR(bp, NIG_REG_XGXS0_CTRL_MD_ST + port*0x18, 0); | 3328 | PHY_INIT); |
3314 | REG_WR(bp, NIG_REG_XGXS0_CTRL_MD_DEVAD + port*0x18, | ||
3315 | params->phy[INT_PHY].def_md_devad); | ||
3316 | } | 3329 | } |
3317 | 3330 | ||
3318 | static void bnx2x_calc_ieee_aneg_adv(struct bnx2x_phy *phy, | 3331 | static void bnx2x_calc_ieee_aneg_adv(struct bnx2x_phy *phy, |
@@ -10999,7 +11012,7 @@ static struct bnx2x_phy phy_xgxs = { | |||
10999 | .format_fw_ver = (format_fw_ver_t)NULL, | 11012 | .format_fw_ver = (format_fw_ver_t)NULL, |
11000 | .hw_reset = (hw_reset_t)NULL, | 11013 | .hw_reset = (hw_reset_t)NULL, |
11001 | .set_link_led = (set_link_led_t)NULL, | 11014 | .set_link_led = (set_link_led_t)NULL, |
11002 | .phy_specific_func = (phy_specific_func_t)NULL | 11015 | .phy_specific_func = (phy_specific_func_t)bnx2x_xgxs_specific_func |
11003 | }; | 11016 | }; |
11004 | static struct bnx2x_phy phy_warpcore = { | 11017 | static struct bnx2x_phy phy_warpcore = { |
11005 | .type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT, | 11018 | .type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT, |