diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bnx2x_link.c | 30 | ||||
-rw-r--r-- | drivers/net/bnx2x_reg.h | 1 |
2 files changed, 20 insertions, 11 deletions
diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c index 73b52f17ea84..35f3b5a05723 100644 --- a/drivers/net/bnx2x_link.c +++ b/drivers/net/bnx2x_link.c | |||
@@ -2258,6 +2258,11 @@ static void bnx2x_bcm8726_external_rom_boot(struct link_params *params) | |||
2258 | MDIO_PMA_REG_GEN_CTRL, | 2258 | MDIO_PMA_REG_GEN_CTRL, |
2259 | MDIO_PMA_REG_GEN_CTRL_ROM_MICRO_RESET); | 2259 | MDIO_PMA_REG_GEN_CTRL_ROM_MICRO_RESET); |
2260 | 2260 | ||
2261 | bnx2x_cl45_write(bp, port, ext_phy_type, ext_phy_addr, | ||
2262 | MDIO_PMA_DEVAD, | ||
2263 | MDIO_PMA_REG_GEN_CTRL2, | ||
2264 | 0x73A0); | ||
2265 | |||
2261 | /* Clear soft reset. | 2266 | /* Clear soft reset. |
2262 | Will automatically reset micro-controller re-boot */ | 2267 | Will automatically reset micro-controller re-boot */ |
2263 | bnx2x_cl45_write(bp, port, ext_phy_type, ext_phy_addr, | 2268 | bnx2x_cl45_write(bp, port, ext_phy_type, ext_phy_addr, |
@@ -2265,8 +2270,8 @@ static void bnx2x_bcm8726_external_rom_boot(struct link_params *params) | |||
2265 | MDIO_PMA_REG_GEN_CTRL, | 2270 | MDIO_PMA_REG_GEN_CTRL, |
2266 | MDIO_PMA_REG_GEN_CTRL_ROM_RESET_INTERNAL_MP); | 2271 | MDIO_PMA_REG_GEN_CTRL_ROM_RESET_INTERNAL_MP); |
2267 | 2272 | ||
2268 | /* wait for 100ms for microcode load */ | 2273 | /* wait for 150ms for microcode load */ |
2269 | msleep(100); | 2274 | msleep(150); |
2270 | 2275 | ||
2271 | /* Disable serial boot control, tristates pins SS_N, SCK, MOSI, MISO */ | 2276 | /* Disable serial boot control, tristates pins SS_N, SCK, MOSI, MISO */ |
2272 | bnx2x_cl45_write(bp, port, ext_phy_type, ext_phy_addr, | 2277 | bnx2x_cl45_write(bp, port, ext_phy_type, ext_phy_addr, |
@@ -2524,7 +2529,7 @@ static u8 bnx2x_bcm8726_set_limiting_mode(struct link_params *params, | |||
2524 | u8 ext_phy_addr = ((params->ext_phy_config & | 2529 | u8 ext_phy_addr = ((params->ext_phy_config & |
2525 | PORT_HW_CFG_XGXS_EXT_PHY_ADDR_MASK) >> | 2530 | PORT_HW_CFG_XGXS_EXT_PHY_ADDR_MASK) >> |
2526 | PORT_HW_CFG_XGXS_EXT_PHY_ADDR_SHIFT); | 2531 | PORT_HW_CFG_XGXS_EXT_PHY_ADDR_SHIFT); |
2527 | 2532 | u16 cur_limiting_mode; | |
2528 | if (bnx2x_read_sfp_module_eeprom(params, | 2533 | if (bnx2x_read_sfp_module_eeprom(params, |
2529 | SFP_EEPROM_OPTIONS_ADDR, | 2534 | SFP_EEPROM_OPTIONS_ADDR, |
2530 | SFP_EEPROM_OPTIONS_SIZE, | 2535 | SFP_EEPROM_OPTIONS_SIZE, |
@@ -2535,6 +2540,16 @@ static u8 bnx2x_bcm8726_set_limiting_mode(struct link_params *params, | |||
2535 | } | 2540 | } |
2536 | limiting_mode = !(options[0] & | 2541 | limiting_mode = !(options[0] & |
2537 | SFP_EEPROM_OPTIONS_LINEAR_RX_OUT_MASK); | 2542 | SFP_EEPROM_OPTIONS_LINEAR_RX_OUT_MASK); |
2543 | |||
2544 | bnx2x_cl45_read(bp, port, | ||
2545 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8726, | ||
2546 | ext_phy_addr, | ||
2547 | MDIO_PMA_DEVAD, | ||
2548 | MDIO_PMA_REG_ROM_VER2, | ||
2549 | &cur_limiting_mode); | ||
2550 | DP(NETIF_MSG_LINK, "Current Limiting mode is 0x%x\n", | ||
2551 | cur_limiting_mode); | ||
2552 | |||
2538 | if (limiting_mode && | 2553 | if (limiting_mode && |
2539 | (module_type != SFP_MODULE_TYPE_PASSIVE_COPPER_CABLE)) { | 2554 | (module_type != SFP_MODULE_TYPE_PASSIVE_COPPER_CABLE)) { |
2540 | DP(NETIF_MSG_LINK, | 2555 | DP(NETIF_MSG_LINK, |
@@ -2547,17 +2562,10 @@ static u8 bnx2x_bcm8726_set_limiting_mode(struct link_params *params, | |||
2547 | MDIO_PMA_REG_ROM_VER2, | 2562 | MDIO_PMA_REG_ROM_VER2, |
2548 | SFP_LIMITING_MODE_VALUE); | 2563 | SFP_LIMITING_MODE_VALUE); |
2549 | } else { /* LRM mode ( default )*/ | 2564 | } else { /* LRM mode ( default )*/ |
2550 | u16 cur_limiting_mode; | 2565 | |
2551 | DP(NETIF_MSG_LINK, "Module options = 0x%x.Setting LRM MODE\n", | 2566 | DP(NETIF_MSG_LINK, "Module options = 0x%x.Setting LRM MODE\n", |
2552 | options[0]); | 2567 | options[0]); |
2553 | 2568 | ||
2554 | bnx2x_cl45_read(bp, port, | ||
2555 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8726, | ||
2556 | ext_phy_addr, | ||
2557 | MDIO_PMA_DEVAD, | ||
2558 | MDIO_PMA_REG_ROM_VER2, | ||
2559 | &cur_limiting_mode); | ||
2560 | |||
2561 | /* Changing to LRM mode takes quite few seconds. | 2569 | /* Changing to LRM mode takes quite few seconds. |
2562 | So do it only if current mode is limiting | 2570 | So do it only if current mode is limiting |
2563 | ( default is LRM )*/ | 2571 | ( default is LRM )*/ |
diff --git a/drivers/net/bnx2x_reg.h b/drivers/net/bnx2x_reg.h index 8de80cca13d3..b8ce6fc927a0 100644 --- a/drivers/net/bnx2x_reg.h +++ b/drivers/net/bnx2x_reg.h | |||
@@ -5843,6 +5843,7 @@ Theotherbitsarereservedandshouldbezero*/ | |||
5843 | #define MDIO_PMA_REG_ROM_VER2 0xca1a | 5843 | #define MDIO_PMA_REG_ROM_VER2 0xca1a |
5844 | #define MDIO_PMA_REG_EDC_FFE_MAIN 0xca1b | 5844 | #define MDIO_PMA_REG_EDC_FFE_MAIN 0xca1b |
5845 | #define MDIO_PMA_REG_PLL_BANDWIDTH 0xca1d | 5845 | #define MDIO_PMA_REG_PLL_BANDWIDTH 0xca1d |
5846 | #define MDIO_PMA_REG_GEN_CTRL2 0xca1e | ||
5846 | #define MDIO_PMA_REG_MISC_CTRL0 0xca23 | 5847 | #define MDIO_PMA_REG_MISC_CTRL0 0xca23 |
5847 | #define MDIO_PMA_REG_LRM_MODE 0xca3f | 5848 | #define MDIO_PMA_REG_LRM_MODE 0xca3f |
5848 | #define MDIO_PMA_REG_CDR_BANDWIDTH 0xca46 | 5849 | #define MDIO_PMA_REG_CDR_BANDWIDTH 0xca46 |