diff options
author | Yaniv Rosner <yanivr@broadcom.com> | 2014-01-01 04:06:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-01 22:09:47 -0500 |
commit | e803d33a32213f2c28456faaa62b2a88f91de2ea (patch) | |
tree | 1627d6c21c91e470e80aa8dc5927c28c5661c5d3 /drivers/net | |
parent | b899e698fca1de16921525e347f6e81539fdedcf (diff) |
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: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c index efbf729568a5..000b6eec38a0 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | |||
@@ -8133,17 +8133,20 @@ static int bnx2x_get_edc_mode(struct bnx2x_phy *phy, | |||
8133 | *edc_mode = EDC_MODE_ACTIVE_DAC; | 8133 | *edc_mode = EDC_MODE_ACTIVE_DAC; |
8134 | else | 8134 | else |
8135 | check_limiting_mode = 1; | 8135 | check_limiting_mode = 1; |
8136 | } else if (copper_module_type & | 8136 | } else { |
8137 | SFP_EEPROM_FC_TX_TECH_BITMASK_COPPER_PASSIVE) { | 8137 | *edc_mode = EDC_MODE_PASSIVE_DAC; |
8138 | /* Even in case PASSIVE_DAC indication is not set, | ||
8139 | * treat it as a passive DAC cable, since some cables | ||
8140 | * don't have this indication. | ||
8141 | */ | ||
8142 | if (copper_module_type & | ||
8143 | SFP_EEPROM_FC_TX_TECH_BITMASK_COPPER_PASSIVE) { | ||
8138 | DP(NETIF_MSG_LINK, | 8144 | DP(NETIF_MSG_LINK, |
8139 | "Passive Copper cable detected\n"); | 8145 | "Passive Copper cable detected\n"); |
8140 | *edc_mode = | 8146 | } else { |
8141 | EDC_MODE_PASSIVE_DAC; | 8147 | DP(NETIF_MSG_LINK, |
8142 | } else { | 8148 | "Unknown copper-cable-type\n"); |
8143 | DP(NETIF_MSG_LINK, | 8149 | } |
8144 | "Unknown copper-cable-type 0x%x !!!\n", | ||
8145 | copper_module_type); | ||
8146 | return -EINVAL; | ||
8147 | } | 8150 | } |
8148 | break; | 8151 | break; |
8149 | } | 8152 | } |