diff options
| -rw-r--r-- | drivers/net/ixgbe/ixgbe_82599.c | 8 | ||||
| -rw-r--r-- | drivers/net/ixgbe/ixgbe_ethtool.c | 4 | ||||
| -rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 6 | ||||
| -rw-r--r-- | drivers/net/ixgbe/ixgbe_phy.c | 38 | ||||
| -rw-r--r-- | drivers/net/ixgbe/ixgbe_phy.h | 3 | ||||
| -rw-r--r-- | drivers/net/ixgbe/ixgbe_type.h | 9 |
6 files changed, 54 insertions, 14 deletions
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c index dc197a4b0676..e9706eb8e4ff 100644 --- a/drivers/net/ixgbe/ixgbe_82599.c +++ b/drivers/net/ixgbe/ixgbe_82599.c | |||
| @@ -2155,10 +2155,14 @@ sfp_check: | |||
| 2155 | goto out; | 2155 | goto out; |
| 2156 | 2156 | ||
| 2157 | switch (hw->phy.type) { | 2157 | switch (hw->phy.type) { |
| 2158 | case ixgbe_phy_tw_tyco: | 2158 | case ixgbe_phy_sfp_passive_tyco: |
| 2159 | case ixgbe_phy_tw_unknown: | 2159 | case ixgbe_phy_sfp_passive_unknown: |
| 2160 | physical_layer = IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU; | 2160 | physical_layer = IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU; |
| 2161 | break; | 2161 | break; |
| 2162 | case ixgbe_phy_sfp_ftl_active: | ||
| 2163 | case ixgbe_phy_sfp_active_unknown: | ||
| 2164 | physical_layer = IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA; | ||
| 2165 | break; | ||
| 2162 | case ixgbe_phy_sfp_avago: | 2166 | case ixgbe_phy_sfp_avago: |
| 2163 | case ixgbe_phy_sfp_ftl: | 2167 | case ixgbe_phy_sfp_ftl: |
| 2164 | case ixgbe_phy_sfp_intel: | 2168 | case ixgbe_phy_sfp_intel: |
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 251767d9fe79..c50a7541ffec 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
| @@ -212,8 +212,8 @@ static int ixgbe_get_settings(struct net_device *netdev, | |||
| 212 | ecmd->port = PORT_FIBRE; | 212 | ecmd->port = PORT_FIBRE; |
| 213 | break; | 213 | break; |
| 214 | case ixgbe_phy_nl: | 214 | case ixgbe_phy_nl: |
| 215 | case ixgbe_phy_tw_tyco: | 215 | case ixgbe_phy_sfp_passive_tyco: |
| 216 | case ixgbe_phy_tw_unknown: | 216 | case ixgbe_phy_sfp_passive_unknown: |
| 217 | case ixgbe_phy_sfp_ftl: | 217 | case ixgbe_phy_sfp_ftl: |
| 218 | case ixgbe_phy_sfp_avago: | 218 | case ixgbe_phy_sfp_avago: |
| 219 | case ixgbe_phy_sfp_intel: | 219 | case ixgbe_phy_sfp_intel: |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index caf1114960ef..9551cbb7bf01 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
| @@ -3118,8 +3118,10 @@ static inline bool ixgbe_is_sfp(struct ixgbe_hw *hw) | |||
| 3118 | case ixgbe_phy_sfp_ftl: | 3118 | case ixgbe_phy_sfp_ftl: |
| 3119 | case ixgbe_phy_sfp_intel: | 3119 | case ixgbe_phy_sfp_intel: |
| 3120 | case ixgbe_phy_sfp_unknown: | 3120 | case ixgbe_phy_sfp_unknown: |
| 3121 | case ixgbe_phy_tw_tyco: | 3121 | case ixgbe_phy_sfp_passive_tyco: |
| 3122 | case ixgbe_phy_tw_unknown: | 3122 | case ixgbe_phy_sfp_passive_unknown: |
| 3123 | case ixgbe_phy_sfp_active_unknown: | ||
| 3124 | case ixgbe_phy_sfp_ftl_active: | ||
| 3123 | return true; | 3125 | return true; |
| 3124 | default: | 3126 | default: |
| 3125 | return false; | 3127 | return false; |
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c index d6d5b843d625..22d21af14783 100644 --- a/drivers/net/ixgbe/ixgbe_phy.c +++ b/drivers/net/ixgbe/ixgbe_phy.c | |||
| @@ -531,6 +531,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) | |||
| 531 | u8 comp_codes_10g = 0; | 531 | u8 comp_codes_10g = 0; |
| 532 | u8 oui_bytes[3] = {0, 0, 0}; | 532 | u8 oui_bytes[3] = {0, 0, 0}; |
| 533 | u8 cable_tech = 0; | 533 | u8 cable_tech = 0; |
| 534 | u8 cable_spec = 0; | ||
| 534 | u16 enforce_sfp = 0; | 535 | u16 enforce_sfp = 0; |
| 535 | 536 | ||
| 536 | if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_fiber) { | 537 | if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_fiber) { |
| @@ -580,14 +581,30 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) | |||
| 580 | else | 581 | else |
| 581 | hw->phy.sfp_type = ixgbe_sfp_type_unknown; | 582 | hw->phy.sfp_type = ixgbe_sfp_type_unknown; |
| 582 | } else if (hw->mac.type == ixgbe_mac_82599EB) { | 583 | } else if (hw->mac.type == ixgbe_mac_82599EB) { |
| 583 | if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) | 584 | if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) { |
| 584 | if (hw->bus.lan_id == 0) | 585 | if (hw->bus.lan_id == 0) |
| 585 | hw->phy.sfp_type = | 586 | hw->phy.sfp_type = |
| 586 | ixgbe_sfp_type_da_cu_core0; | 587 | ixgbe_sfp_type_da_cu_core0; |
| 587 | else | 588 | else |
| 588 | hw->phy.sfp_type = | 589 | hw->phy.sfp_type = |
| 589 | ixgbe_sfp_type_da_cu_core1; | 590 | ixgbe_sfp_type_da_cu_core1; |
| 590 | else if (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE) | 591 | } else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) { |
| 592 | hw->phy.ops.read_i2c_eeprom( | ||
| 593 | hw, IXGBE_SFF_CABLE_SPEC_COMP, | ||
| 594 | &cable_spec); | ||
| 595 | if (cable_spec & | ||
| 596 | IXGBE_SFF_DA_SPEC_ACTIVE_LIMITING) { | ||
| 597 | if (hw->bus.lan_id == 0) | ||
| 598 | hw->phy.sfp_type = | ||
| 599 | ixgbe_sfp_type_da_act_lmt_core0; | ||
| 600 | else | ||
| 601 | hw->phy.sfp_type = | ||
| 602 | ixgbe_sfp_type_da_act_lmt_core1; | ||
| 603 | } else { | ||
| 604 | hw->phy.sfp_type = | ||
| 605 | ixgbe_sfp_type_unknown; | ||
| 606 | } | ||
| 607 | } else if (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE) | ||
| 591 | if (hw->bus.lan_id == 0) | 608 | if (hw->bus.lan_id == 0) |
| 592 | hw->phy.sfp_type = | 609 | hw->phy.sfp_type = |
| 593 | ixgbe_sfp_type_srlr_core0; | 610 | ixgbe_sfp_type_srlr_core0; |
| @@ -637,10 +654,14 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) | |||
| 637 | switch (vendor_oui) { | 654 | switch (vendor_oui) { |
| 638 | case IXGBE_SFF_VENDOR_OUI_TYCO: | 655 | case IXGBE_SFF_VENDOR_OUI_TYCO: |
| 639 | if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) | 656 | if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) |
| 640 | hw->phy.type = ixgbe_phy_tw_tyco; | 657 | hw->phy.type = |
| 658 | ixgbe_phy_sfp_passive_tyco; | ||
| 641 | break; | 659 | break; |
| 642 | case IXGBE_SFF_VENDOR_OUI_FTL: | 660 | case IXGBE_SFF_VENDOR_OUI_FTL: |
| 643 | hw->phy.type = ixgbe_phy_sfp_ftl; | 661 | if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) |
| 662 | hw->phy.type = ixgbe_phy_sfp_ftl_active; | ||
| 663 | else | ||
| 664 | hw->phy.type = ixgbe_phy_sfp_ftl; | ||
| 644 | break; | 665 | break; |
| 645 | case IXGBE_SFF_VENDOR_OUI_AVAGO: | 666 | case IXGBE_SFF_VENDOR_OUI_AVAGO: |
| 646 | hw->phy.type = ixgbe_phy_sfp_avago; | 667 | hw->phy.type = ixgbe_phy_sfp_avago; |
| @@ -650,7 +671,11 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) | |||
| 650 | break; | 671 | break; |
| 651 | default: | 672 | default: |
| 652 | if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) | 673 | if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) |
| 653 | hw->phy.type = ixgbe_phy_tw_unknown; | 674 | hw->phy.type = |
| 675 | ixgbe_phy_sfp_passive_unknown; | ||
| 676 | else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) | ||
| 677 | hw->phy.type = | ||
| 678 | ixgbe_phy_sfp_active_unknown; | ||
| 654 | else | 679 | else |
| 655 | hw->phy.type = ixgbe_phy_sfp_unknown; | 680 | hw->phy.type = ixgbe_phy_sfp_unknown; |
| 656 | break; | 681 | break; |
| @@ -658,7 +683,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) | |||
| 658 | } | 683 | } |
| 659 | 684 | ||
| 660 | /* All passive DA cables are supported */ | 685 | /* All passive DA cables are supported */ |
| 661 | if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) { | 686 | if (cable_tech & (IXGBE_SFF_DA_PASSIVE_CABLE | |
| 687 | IXGBE_SFF_DA_ACTIVE_CABLE)) { | ||
| 662 | status = 0; | 688 | status = 0; |
| 663 | goto out; | 689 | goto out; |
| 664 | } | 690 | } |
diff --git a/drivers/net/ixgbe/ixgbe_phy.h b/drivers/net/ixgbe/ixgbe_phy.h index 9cf5f3b4cc5d..c9c545941407 100644 --- a/drivers/net/ixgbe/ixgbe_phy.h +++ b/drivers/net/ixgbe/ixgbe_phy.h | |||
| @@ -40,9 +40,12 @@ | |||
| 40 | #define IXGBE_SFF_1GBE_COMP_CODES 0x6 | 40 | #define IXGBE_SFF_1GBE_COMP_CODES 0x6 |
| 41 | #define IXGBE_SFF_10GBE_COMP_CODES 0x3 | 41 | #define IXGBE_SFF_10GBE_COMP_CODES 0x3 |
| 42 | #define IXGBE_SFF_CABLE_TECHNOLOGY 0x8 | 42 | #define IXGBE_SFF_CABLE_TECHNOLOGY 0x8 |
| 43 | #define IXGBE_SFF_CABLE_SPEC_COMP 0x3C | ||
| 43 | 44 | ||
| 44 | /* Bitmasks */ | 45 | /* Bitmasks */ |
| 45 | #define IXGBE_SFF_DA_PASSIVE_CABLE 0x4 | 46 | #define IXGBE_SFF_DA_PASSIVE_CABLE 0x4 |
| 47 | #define IXGBE_SFF_DA_ACTIVE_CABLE 0x8 | ||
| 48 | #define IXGBE_SFF_DA_SPEC_ACTIVE_LIMITING 0x4 | ||
| 46 | #define IXGBE_SFF_1GBASESX_CAPABLE 0x1 | 49 | #define IXGBE_SFF_1GBASESX_CAPABLE 0x1 |
| 47 | #define IXGBE_SFF_1GBASELX_CAPABLE 0x2 | 50 | #define IXGBE_SFF_1GBASELX_CAPABLE 0x2 |
| 48 | #define IXGBE_SFF_10GBASESR_CAPABLE 0x10 | 51 | #define IXGBE_SFF_10GBASESR_CAPABLE 0x10 |
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h index bd69196ff522..39b9be897439 100644 --- a/drivers/net/ixgbe/ixgbe_type.h +++ b/drivers/net/ixgbe/ixgbe_type.h | |||
| @@ -2108,6 +2108,7 @@ typedef u32 ixgbe_physical_layer; | |||
| 2108 | #define IXGBE_PHYSICAL_LAYER_1000BASE_BX 0x0400 | 2108 | #define IXGBE_PHYSICAL_LAYER_1000BASE_BX 0x0400 |
| 2109 | #define IXGBE_PHYSICAL_LAYER_10GBASE_KR 0x0800 | 2109 | #define IXGBE_PHYSICAL_LAYER_10GBASE_KR 0x0800 |
| 2110 | #define IXGBE_PHYSICAL_LAYER_10GBASE_XAUI 0x1000 | 2110 | #define IXGBE_PHYSICAL_LAYER_10GBASE_XAUI 0x1000 |
| 2111 | #define IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA 0x2000 | ||
| 2111 | 2112 | ||
| 2112 | /* Software ATR hash keys */ | 2113 | /* Software ATR hash keys */ |
| 2113 | #define IXGBE_ATR_BUCKET_HASH_KEY 0xE214AD3D | 2114 | #define IXGBE_ATR_BUCKET_HASH_KEY 0xE214AD3D |
| @@ -2177,10 +2178,12 @@ enum ixgbe_phy_type { | |||
| 2177 | ixgbe_phy_qt, | 2178 | ixgbe_phy_qt, |
| 2178 | ixgbe_phy_xaui, | 2179 | ixgbe_phy_xaui, |
| 2179 | ixgbe_phy_nl, | 2180 | ixgbe_phy_nl, |
| 2180 | ixgbe_phy_tw_tyco, | 2181 | ixgbe_phy_sfp_passive_tyco, |
| 2181 | ixgbe_phy_tw_unknown, | 2182 | ixgbe_phy_sfp_passive_unknown, |
| 2183 | ixgbe_phy_sfp_active_unknown, | ||
| 2182 | ixgbe_phy_sfp_avago, | 2184 | ixgbe_phy_sfp_avago, |
| 2183 | ixgbe_phy_sfp_ftl, | 2185 | ixgbe_phy_sfp_ftl, |
| 2186 | ixgbe_phy_sfp_ftl_active, | ||
| 2184 | ixgbe_phy_sfp_unknown, | 2187 | ixgbe_phy_sfp_unknown, |
| 2185 | ixgbe_phy_sfp_intel, | 2188 | ixgbe_phy_sfp_intel, |
| 2186 | ixgbe_phy_sfp_unsupported, | 2189 | ixgbe_phy_sfp_unsupported, |
| @@ -2208,6 +2211,8 @@ enum ixgbe_sfp_type { | |||
| 2208 | ixgbe_sfp_type_da_cu_core1 = 4, | 2211 | ixgbe_sfp_type_da_cu_core1 = 4, |
| 2209 | ixgbe_sfp_type_srlr_core0 = 5, | 2212 | ixgbe_sfp_type_srlr_core0 = 5, |
| 2210 | ixgbe_sfp_type_srlr_core1 = 6, | 2213 | ixgbe_sfp_type_srlr_core1 = 6, |
| 2214 | ixgbe_sfp_type_da_act_lmt_core0 = 7, | ||
| 2215 | ixgbe_sfp_type_da_act_lmt_core1 = 8, | ||
| 2211 | ixgbe_sfp_type_not_present = 0xFFFE, | 2216 | ixgbe_sfp_type_not_present = 0xFFFE, |
| 2212 | ixgbe_sfp_type_unknown = 0xFFFF | 2217 | ixgbe_sfp_type_unknown = 0xFFFF |
| 2213 | }; | 2218 | }; |
