ixgbe/base: clean phy sfp handling
authorOuyang Changchun <changchun.ouyang@intel.com>
Tue, 7 Oct 2014 07:53:52 +0000 (09:53 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 7 Oct 2014 14:24:35 +0000 (16:24 +0200)
Remove 10GBASE_ER support.
Always support 1000BASE_LX.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c
lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c
lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h

index 605d593..06cacfa 100644 (file)
@@ -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;
index 0732a5f..60995dc 100644 (file)
@@ -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;
index f20c21a..c47812b 100644 (file)
@@ -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
index c4e6879..43201ab 100644 (file)
@@ -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
 };