From: Ouyang Changchun Date: Tue, 7 Oct 2014 07:53:52 +0000 (+0200) Subject: ixgbe/base: clean phy sfp handling X-Git-Tag: spdx-start~10356 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=558136b918d2230e1f9a222193ce5de9c027fb6a;p=dpdk.git ixgbe/base: clean phy sfp handling Remove 10GBASE_ER support. Always support 1000BASE_LX. Signed-off-by: Changchun Ouyang [Thomas: split patch] --- diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c index 605d593aaa..06cacfa521 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c @@ -415,10 +415,8 @@ s32 ixgbe_get_link_capabilities_82599(struct ixgbe_hw *hw, /* Check if 1G SFP module. */ if (hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0 || hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 || -#ifdef SUPPORT_1000BASE_LX hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 || hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 || -#endif hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 || hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1) { *speed = IXGBE_LINK_SPEED_1GB_FULL; diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c index 0732a5fbbe..60995dc8fb 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c @@ -1109,16 +1109,6 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) else hw->phy.sfp_type = ixgbe_sfp_type_srlr_core1; -#ifdef SUPPORT_10GBASE_ER - } else if (comp_codes_10g & - IXGBE_SFF_10GBASEER_CAPABLE) { - if (hw->bus.lan_id == 0) - hw->phy.sfp_type = - ixgbe_sfp_type_er_core0; - else - hw->phy.sfp_type = - ixgbe_sfp_type_er_core1; -#endif /* SUPPORT_10GBASE_ER */ } else if (comp_codes_1g & IXGBE_SFF_1GBASET_CAPABLE) { if (hw->bus.lan_id == 0) hw->phy.sfp_type = @@ -1133,7 +1123,6 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) else hw->phy.sfp_type = ixgbe_sfp_type_1g_sx_core1; -#ifdef SUPPORT_1000BASE_LX } else if (comp_codes_1g & IXGBE_SFF_1GBASELX_CAPABLE) { if (hw->bus.lan_id == 0) hw->phy.sfp_type = @@ -1141,7 +1130,6 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) else hw->phy.sfp_type = ixgbe_sfp_type_1g_lx_core1; -#endif /* SUPPORT_1000BASE_LX */ } else { hw->phy.sfp_type = ixgbe_sfp_type_unknown; } @@ -1229,10 +1217,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) if (comp_codes_10g == 0 && !(hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 || hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0 || -#ifdef SUPPORT_1000BASE_LX hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 || hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 || -#endif hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 || hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1)) { hw->phy.type = ixgbe_phy_sfp_unsupported; @@ -1250,14 +1236,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP) && !(hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0 || hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 || -#ifdef SUPPORT_1000BASE_LX hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 || hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 || -#endif -#ifdef SUPPORT_10GBASE_ER - hw->phy.sfp_type == ixgbe_sfp_type_er_core0 || - hw->phy.sfp_type == ixgbe_sfp_type_er_core1 || -#endif hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 || hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1)) { /* Make sure we're a supported PHY type */ @@ -1595,22 +1575,12 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw, * SR modules */ if (sfp_type == ixgbe_sfp_type_da_act_lmt_core0 || -#ifdef SUPPORT_10GBASE_ER - sfp_type == ixgbe_sfp_type_er_core0 || -#endif /* SUPPORT_10GBASE_ER */ -#ifdef SUPPORT_1000BASE_LX sfp_type == ixgbe_sfp_type_1g_lx_core0 || -#endif /* SUPPORT_1000BASE_LX */ sfp_type == ixgbe_sfp_type_1g_cu_core0 || sfp_type == ixgbe_sfp_type_1g_sx_core0) sfp_type = ixgbe_sfp_type_srlr_core0; else if (sfp_type == ixgbe_sfp_type_da_act_lmt_core1 || -#ifdef SUPPORT_10GBASE_ER - sfp_type == ixgbe_sfp_type_er_core1 || -#endif /* SUPPORT_10GBASE_ER */ -#ifdef SUPPORT_1000BASE_LX sfp_type == ixgbe_sfp_type_1g_lx_core1 || -#endif /* SUPPORT_1000BASE_LX */ sfp_type == ixgbe_sfp_type_1g_cu_core1 || sfp_type == ixgbe_sfp_type_1g_sx_core1) sfp_type = ixgbe_sfp_type_srlr_core1; diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h index f20c21a4cd..c47812bf5c 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h @@ -70,9 +70,6 @@ POSSIBILITY OF SUCH DAMAGE. #define IXGBE_SFF_1GBASET_CAPABLE 0x8 #define IXGBE_SFF_10GBASESR_CAPABLE 0x10 #define IXGBE_SFF_10GBASELR_CAPABLE 0x20 -#ifdef SUPPORT_10GBASE_ER -#define IXGBE_SFF_10GBASEER_CAPABLE 0x80 -#endif /* SUPPORT_10GBASE_ER */ #define IXGBE_SFF_ADDRESSING_MODE 0x4 #define IXGBE_SFF_QSFP_DA_ACTIVE_CABLE 0x1 #define IXGBE_SFF_QSFP_DA_PASSIVE_CABLE 0x8 diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h index c4e68797d9..43201ab8e3 100644 --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h @@ -2874,14 +2874,8 @@ enum ixgbe_sfp_type { ixgbe_sfp_type_1g_cu_core1 = 10, ixgbe_sfp_type_1g_sx_core0 = 11, ixgbe_sfp_type_1g_sx_core1 = 12, -#ifdef SUPPORT_1000BASE_LX ixgbe_sfp_type_1g_lx_core0 = 13, ixgbe_sfp_type_1g_lx_core1 = 14, -#endif /* SUPPORT_1000BASE_LX */ -#ifdef SUPPORT_10GBASE_ER - ixgbe_sfp_type_er_core0 = 15, - ixgbe_sfp_type_er_core1 = 16, -#endif /* SUPPORT_10GBASE_ER */ ixgbe_sfp_type_not_present = 0xFFFE, ixgbe_sfp_type_unknown = 0xFFFF };