Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150327
b: refs/heads/master
c: 537d58a
h: refs/heads/master
i:
  150325: 4326087
  150323: b710c77
  150319: 086d575
v: v3
  • Loading branch information
Peter P Waskiewicz Jr authored and David S. Miller committed May 19, 2009
1 parent 2310c4d commit 93bccc1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa5aec888585fedcda7cfffc20f75240ad1cb42d
refs/heads/master: 537d58a00a8756189b10ffc1309c0131d57b6320
20 changes: 9 additions & 11 deletions trunk/drivers/net/ixgbe/ixgbe_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
u8 comp_codes_1g = 0;
u8 comp_codes_10g = 0;
u8 oui_bytes[3] = {0, 0, 0};
u8 transmission_media = 0;
u8 cable_tech = 0;
u16 enforce_sfp = 0;

status = hw->phy.ops.read_i2c_eeprom(hw, IXGBE_SFF_IDENTIFIER,
Expand All @@ -543,8 +543,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
&comp_codes_1g);
hw->phy.ops.read_i2c_eeprom(hw, IXGBE_SFF_10GBE_COMP_CODES,
&comp_codes_10g);
hw->phy.ops.read_i2c_eeprom(hw, IXGBE_SFF_TRANSMISSION_MEDIA,
&transmission_media);
hw->phy.ops.read_i2c_eeprom(hw, IXGBE_SFF_CABLE_TECHNOLOGY,
&cable_tech);

/* ID Module
* =========
Expand All @@ -557,7 +557,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
* 6 SFP_SR/LR_CORE1 - 82599-specific
*/
if (hw->mac.type == ixgbe_mac_82598EB) {
if (transmission_media & IXGBE_SFF_TWIN_AX_CAPABLE)
if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)
hw->phy.sfp_type = ixgbe_sfp_type_da_cu;
else if (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)
hw->phy.sfp_type = ixgbe_sfp_type_sr;
Expand All @@ -566,7 +566,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
else
hw->phy.sfp_type = ixgbe_sfp_type_unknown;
} else if (hw->mac.type == ixgbe_mac_82599EB) {
if (transmission_media & IXGBE_SFF_TWIN_AX_CAPABLE)
if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)
if (hw->bus.lan_id == 0)
hw->phy.sfp_type =
ixgbe_sfp_type_da_cu_core0;
Expand Down Expand Up @@ -621,8 +621,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)

switch (vendor_oui) {
case IXGBE_SFF_VENDOR_OUI_TYCO:
if (transmission_media &
IXGBE_SFF_TWIN_AX_CAPABLE)
if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)
hw->phy.type = ixgbe_phy_tw_tyco;
break;
case IXGBE_SFF_VENDOR_OUI_FTL:
Expand All @@ -635,17 +634,16 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
hw->phy.type = ixgbe_phy_sfp_intel;
break;
default:
if (transmission_media &
IXGBE_SFF_TWIN_AX_CAPABLE)
if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)
hw->phy.type = ixgbe_phy_tw_unknown;
else
hw->phy.type = ixgbe_phy_sfp_unknown;
break;
}
}

/* All DA cables are supported */
if (transmission_media & IXGBE_SFF_TWIN_AX_CAPABLE) {
/* All passive DA cables are supported */
if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) {
status = 0;
goto out;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ixgbe/ixgbe_phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
#define IXGBE_SFF_VENDOR_OUI_BYTE2 0x27
#define IXGBE_SFF_1GBE_COMP_CODES 0x6
#define IXGBE_SFF_10GBE_COMP_CODES 0x3
#define IXGBE_SFF_TRANSMISSION_MEDIA 0x9
#define IXGBE_SFF_CABLE_TECHNOLOGY 0x8

/* Bitmasks */
#define IXGBE_SFF_TWIN_AX_CAPABLE 0x80
#define IXGBE_SFF_DA_PASSIVE_CABLE 0x4
#define IXGBE_SFF_1GBASESX_CAPABLE 0x1
#define IXGBE_SFF_1GBASELX_CAPABLE 0x2
#define IXGBE_SFF_10GBASESR_CAPABLE 0x10
Expand Down

0 comments on commit 93bccc1

Please sign in to comment.