net/ixgbe/base: cleanup codes
authorXiaoyun Li <xiaoyun.li@intel.com>
Mon, 17 Sep 2018 09:28:09 +0000 (17:28 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 27 Sep 2018 23:41:02 +0000 (01:41 +0200)
Cleanup UNREFERENCED_1PARAMETER() macro because "hw" is used.
And remove Light Spring codes because the device was never
productised. And cleanup unused bypass codes.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ixgbe/base/ixgbe_82599.c
drivers/net/ixgbe/base/ixgbe_api.c
drivers/net/ixgbe/base/ixgbe_common.c
drivers/net/ixgbe/base/ixgbe_phy.c
drivers/net/ixgbe/base/ixgbe_type.h
drivers/net/ixgbe/ixgbe_ethdev.c

index 33d8c4a..7de753f 100644 (file)
@@ -58,9 +58,6 @@ void ixgbe_init_mac_link_ops_82599(struct ixgbe_hw *hw)
                mac->ops.setup_mac_link = ixgbe_setup_mac_link_82599;
                mac->ops.set_rate_select_speed =
                                               ixgbe_set_hard_rate_select_speed;
-               if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber_fixed)
-                       mac->ops.set_rate_select_speed =
-                                              ixgbe_set_soft_rate_select_speed;
        } else {
                if ((ixgbe_get_media_type(hw) == ixgbe_media_type_backplane) &&
                     (hw->phy.smart_speed == ixgbe_smart_speed_auto ||
@@ -532,16 +529,9 @@ enum ixgbe_media_type ixgbe_get_media_type_82599(struct ixgbe_hw *hw)
        case IXGBE_DEV_ID_82599_T3_LOM:
                media_type = ixgbe_media_type_copper;
                break;
-       case IXGBE_DEV_ID_82599_LS:
-               media_type = ixgbe_media_type_fiber_lco;
-               break;
        case IXGBE_DEV_ID_82599_QSFP_SF_QP:
                media_type = ixgbe_media_type_fiber_qsfp;
                break;
-       case IXGBE_DEV_ID_82599_BYPASS:
-               media_type = ixgbe_media_type_fiber_fixed;
-               hw->phy.multispeed_fiber = true;
-               break;
        default:
                media_type = ixgbe_media_type_unknown;
                break;
index a2eab13..3450d40 100644 (file)
@@ -148,8 +148,6 @@ s32 ixgbe_set_mac_type(struct ixgbe_hw *hw)
        case IXGBE_DEV_ID_82599_QSFP_SF_QP:
        case IXGBE_DEV_ID_82599EN_SFP:
        case IXGBE_DEV_ID_82599_CX4:
-       case IXGBE_DEV_ID_82599_LS:
-       case IXGBE_DEV_ID_82599_BYPASS:
        case IXGBE_DEV_ID_82599_T3_LOM:
                hw->mac.type = ixgbe_mac_82599EB;
                break;
@@ -164,7 +162,6 @@ s32 ixgbe_set_mac_type(struct ixgbe_hw *hw)
                break;
        case IXGBE_DEV_ID_X540T:
        case IXGBE_DEV_ID_X540T1:
-       case IXGBE_DEV_ID_X540_BYPASS:
                hw->mac.type = ixgbe_mac_X540;
                hw->mvals = ixgbe_mvals_X540;
                break;
index d7b63c6..b4a0d70 100644 (file)
@@ -138,7 +138,6 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
        DEBUGFUNC("ixgbe_device_supports_autoneg_fc");
 
        switch (hw->phy.media_type) {
-       case ixgbe_media_type_fiber_fixed:
        case ixgbe_media_type_fiber_qsfp:
        case ixgbe_media_type_fiber:
                /* flow control autoneg black list */
@@ -172,7 +171,6 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
                case IXGBE_DEV_ID_82599_T3_LOM:
                case IXGBE_DEV_ID_X540T:
                case IXGBE_DEV_ID_X540T1:
-               case IXGBE_DEV_ID_X540_BYPASS:
                case IXGBE_DEV_ID_X550T:
                case IXGBE_DEV_ID_X550T1:
                case IXGBE_DEV_ID_X550EM_X_10G_T:
@@ -238,7 +236,6 @@ s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw)
                        goto out;
 
                /* fall through - only backplane uses autoc */
-       case ixgbe_media_type_fiber_fixed:
        case ixgbe_media_type_fiber_qsfp:
        case ixgbe_media_type_fiber:
                reg = IXGBE_READ_REG(hw, IXGBE_PCS1GANA);
@@ -3098,7 +3095,6 @@ void ixgbe_fc_autoneg(struct ixgbe_hw *hw)
 
        switch (hw->phy.media_type) {
        /* Autoneg flow control on fiber adapters */
-       case ixgbe_media_type_fiber_fixed:
        case ixgbe_media_type_fiber_qsfp:
        case ixgbe_media_type_fiber:
                if (speed == IXGBE_LINK_SPEED_1GB_FULL)
@@ -5238,7 +5234,6 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
 
                /* Set the module link speed */
                switch (hw->phy.media_type) {
-               case ixgbe_media_type_fiber_fixed:
                case ixgbe_media_type_fiber:
                        ixgbe_set_rate_select_speed(hw,
                                                    IXGBE_LINK_SPEED_10GB_FULL);
@@ -5289,7 +5284,6 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
 
                /* Set the module link speed */
                switch (hw->phy.media_type) {
-               case ixgbe_media_type_fiber_fixed:
                case ixgbe_media_type_fiber:
                        ixgbe_set_rate_select_speed(hw,
                                                    IXGBE_LINK_SPEED_1GB_FULL);
index 47451c9..6cdd8fb 100644 (file)
@@ -2565,7 +2565,6 @@ STATIC bool ixgbe_get_i2c_data(struct ixgbe_hw *hw, u32 *i2cctl)
 {
        u32 data_oe_bit = IXGBE_I2C_DATA_OE_N_EN_BY_MAC(hw);
        bool data;
-       UNREFERENCED_1PARAMETER(hw);
 
        DEBUGFUNC("ixgbe_get_i2c_data");
 
index cc26496..ff3546e 100644 (file)
@@ -17,8 +17,8 @@
  *
  * - IXGBE_ERROR_POLLING
  * This category is for errors related to polling/timeout issues and should be
- * used in any case where the timeout occured, or a failure to obtain a lock, or
- * failure to receive data within the time limit.
+ * used in any case where the timeout occurred, or a failure to obtain a lock,
+ * or failure to receive data within the time limit.
  *
  * - IXGBE_ERROR_CAUTION
  * This category should be used for reporting issues that may be the cause of
 #define IXGBE_DEV_ID_82599_T3_LOM              0x151C
 #define IXGBE_DEV_ID_82599_VF                  0x10ED
 #define IXGBE_DEV_ID_82599_VF_HV               0x152E
-#define IXGBE_DEV_ID_82599_LS                  0x154F
-#define IXGBE_DEV_ID_82599_BYPASS              0x155D
 #define IXGBE_DEV_ID_X540T                     0x1528
 #define IXGBE_DEV_ID_X540_VF                   0x1515
 #define IXGBE_DEV_ID_X540_VF_HV                        0x1530
-#define IXGBE_DEV_ID_X540_BYPASS               0x155C
 #define IXGBE_DEV_ID_X540T1                    0x1560
 #define IXGBE_DEV_ID_X550T                     0x1563
 #define IXGBE_DEV_ID_X550T1                    0x15D1
@@ -3726,9 +3723,7 @@ enum ixgbe_sfp_type {
 enum ixgbe_media_type {
        ixgbe_media_type_unknown = 0,
        ixgbe_media_type_fiber,
-       ixgbe_media_type_fiber_fixed,
        ixgbe_media_type_fiber_qsfp,
-       ixgbe_media_type_fiber_lco,
        ixgbe_media_type_copper,
        ixgbe_media_type_backplane,
        ixgbe_media_type_cx4,
index cee8867..4c3f9a9 100644 (file)
@@ -437,7 +437,6 @@ static const struct rte_pci_id pci_id_ixgbe_map[] = {
        { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP) },
        { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM) },
        { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM) },
-       { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_LS) },
        { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T) },
        { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1) },
        { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_SFP) },