Commit 0afbd74a authored by Yaniv Rosner's avatar Yaniv Rosner Committed by David S. Miller

bnx2x: 57840 non-external loopback test fail on 1G

when 1G-optic module was plugged in, internal loopback test failed because the
driver used to check the optic module (with no need), and for 1G optic module,
the link speed was forced down to 1G, while the XMAC (10G MAC) was enabled.
This patch avoid accessing optic module in case internal loopback was selected,
and update the link speed in case 1G optic module was detected during init
stage.
Signed-off-by: default avatarYaniv Rosner <yanivr@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4e4b14c9
...@@ -4523,10 +4523,14 @@ static void bnx2x_warpcore_config_init(struct bnx2x_phy *phy, ...@@ -4523,10 +4523,14 @@ static void bnx2x_warpcore_config_init(struct bnx2x_phy *phy,
* enabled transmitter to avoid current leakage in case * enabled transmitter to avoid current leakage in case
* no module is connected * no module is connected
*/ */
if ((params->loopback_mode == LOOPBACK_NONE) ||
(params->loopback_mode == LOOPBACK_EXT)) {
if (bnx2x_is_sfp_module_plugged(phy, params)) if (bnx2x_is_sfp_module_plugged(phy, params))
bnx2x_sfp_module_detection(phy, params); bnx2x_sfp_module_detection(phy, params);
else else
bnx2x_sfp_e3_set_transmitter(params, phy, 1); bnx2x_sfp_e3_set_transmitter(params,
phy, 1);
}
bnx2x_warpcore_config_sfi(phy, params); bnx2x_warpcore_config_sfi(phy, params);
break; break;
...@@ -6528,6 +6532,11 @@ static int bnx2x_link_initialize(struct link_params *params, ...@@ -6528,6 +6532,11 @@ static int bnx2x_link_initialize(struct link_params *params,
params->phy[INT_PHY].config_init(phy, params, vars); params->phy[INT_PHY].config_init(phy, params, vars);
} }
/* Re-read this value in case it was changed inside config_init due to
* limitations of optic module
*/
vars->line_speed = params->phy[INT_PHY].req_line_speed;
/* Init external phy*/ /* Init external phy*/
if (non_ext_phy) { if (non_ext_phy) {
if (params->phy[INT_PHY].supported & if (params->phy[INT_PHY].supported &
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment