提交 e803d33a 编写于 作者: Y Yaniv Rosner 提交者: David S. Miller

bnx2x: Fix passive DAC cable detection

Fix Passive DAC detection for specific cables, such that even in case
SFP_CABLE_TECHNOLOGY option is not set in the EEPROM (offset 8), treat it as a
passive DAC cable, since some cables don't have this indication.
Signed-off-by: NYaniv Rosner <yanivr@broadcom.com>
Signed-off-by: NAriel Elior <ariele@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b899e698
...@@ -8133,17 +8133,20 @@ static int bnx2x_get_edc_mode(struct bnx2x_phy *phy, ...@@ -8133,17 +8133,20 @@ static int bnx2x_get_edc_mode(struct bnx2x_phy *phy,
*edc_mode = EDC_MODE_ACTIVE_DAC; *edc_mode = EDC_MODE_ACTIVE_DAC;
else else
check_limiting_mode = 1; check_limiting_mode = 1;
} else if (copper_module_type & } else {
SFP_EEPROM_FC_TX_TECH_BITMASK_COPPER_PASSIVE) { *edc_mode = EDC_MODE_PASSIVE_DAC;
/* Even in case PASSIVE_DAC indication is not set,
* treat it as a passive DAC cable, since some cables
* don't have this indication.
*/
if (copper_module_type &
SFP_EEPROM_FC_TX_TECH_BITMASK_COPPER_PASSIVE) {
DP(NETIF_MSG_LINK, DP(NETIF_MSG_LINK,
"Passive Copper cable detected\n"); "Passive Copper cable detected\n");
*edc_mode = } else {
EDC_MODE_PASSIVE_DAC; DP(NETIF_MSG_LINK,
} else { "Unknown copper-cable-type\n");
DP(NETIF_MSG_LINK, }
"Unknown copper-cable-type 0x%x !!!\n",
copper_module_type);
return -EINVAL;
} }
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册