diff options
Diffstat (limited to 'drivers')
-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, |