aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>2018-07-19 01:50:02 -0400
committerDavid S. Miller <davem@davemloft.net>2018-07-21 19:19:04 -0400
commit4ad95a93a702ec4f4fb5159b822797ba67b8cbbe (patch)
treef1cd7e10fbbd2952dcc1c70ca313429b04527896
parent64119e05f7b31e83e2555f6782e6cdc8f81c63f4 (diff)
qed: Fix link flap issue due to mismatching EEE capabilities.
Apparently, MFW publishes EEE capabilities even for Fiber-boards that don't support them, and later since qed internally sets adv_caps it would cause link-flap avoidance (LFA) to fail when driver would initiate the link. This in turn delays the link, causing traffic to fail. Driver has been modified to not to ask MFW for any EEE config if EEE isn't to be enabled. Fixes: 645874e5 ("qed: Add support for Energy efficient ethernet.") Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com> Signed-off-by: Ariel Elior <ariel.elior@cavium.com> Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_mcp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.c b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
index 9d9e533bccdc..cace28365189 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_mcp.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
@@ -1308,9 +1308,15 @@ int qed_mcp_set_link(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, bool b_up)
1308 phy_cfg.pause |= (params->pause.forced_tx) ? ETH_PAUSE_TX : 0; 1308 phy_cfg.pause |= (params->pause.forced_tx) ? ETH_PAUSE_TX : 0;
1309 phy_cfg.adv_speed = params->speed.advertised_speeds; 1309 phy_cfg.adv_speed = params->speed.advertised_speeds;
1310 phy_cfg.loopback_mode = params->loopback_mode; 1310 phy_cfg.loopback_mode = params->loopback_mode;
1311 if (p_hwfn->mcp_info->capabilities & FW_MB_PARAM_FEATURE_SUPPORT_EEE) { 1311
1312 if (params->eee.enable) 1312 /* There are MFWs that share this capability regardless of whether
1313 phy_cfg.eee_cfg |= EEE_CFG_EEE_ENABLED; 1313 * this is feasible or not. And given that at the very least adv_caps
1314 * would be set internally by qed, we want to make sure LFA would
1315 * still work.
1316 */
1317 if ((p_hwfn->mcp_info->capabilities &
1318 FW_MB_PARAM_FEATURE_SUPPORT_EEE) && params->eee.enable) {
1319 phy_cfg.eee_cfg |= EEE_CFG_EEE_ENABLED;
1314 if (params->eee.tx_lpi_enable) 1320 if (params->eee.tx_lpi_enable)
1315 phy_cfg.eee_cfg |= EEE_CFG_TX_LPI; 1321 phy_cfg.eee_cfg |= EEE_CFG_TX_LPI;
1316 if (params->eee.adv_caps & QED_EEE_1G_ADV) 1322 if (params->eee.adv_caps & QED_EEE_1G_ADV)