]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
ixgbe: remove unused media type
authorJacob Keller <jacob.e.keller@intel.com>
Sat, 22 Feb 2014 01:23:57 +0000 (01:23 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 20 Mar 2014 07:23:06 +0000 (00:23 -0700)
This patch reverts the addition of the fiber_fixed type, which ended up
never being used. We don't have plans to support this type going
forward, and there is no reason to keep an unused type around polluting
the code.

Reverts: 4e8e1bca6e2 ("ixgbe: add new media type")
CC: Arun Sharma <asharma@fb.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h

index e0fe8e88fbfae7abab75b07e7718560108c3316b..bdac7bd1725af9353df0e8042a626b4a8d4ebe0c 100644 (file)
@@ -663,75 +663,6 @@ static void ixgbe_flap_tx_laser_multispeed_fiber(struct ixgbe_hw *hw)
        }
 }
 
-/**
- *  ixgbe_set_fiber_fixed_speed - Set module link speed for fixed fiber
- *  @hw: pointer to hardware structure
- *  @speed: link speed to set
- *
- *  We set the module speed differently for fixed fiber.  For other
- *  multi-speed devices we don't have an error value so here if we
- *  detect an error we just log it and exit.
- */
-static void ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw,
-                                       ixgbe_link_speed speed)
-{
-       s32 status;
-       u8 rs, eeprom_data;
-
-       switch (speed) {
-       case IXGBE_LINK_SPEED_10GB_FULL:
-               /* one bit mask same as setting on */
-               rs = IXGBE_SFF_SOFT_RS_SELECT_10G;
-               break;
-       case IXGBE_LINK_SPEED_1GB_FULL:
-               rs = IXGBE_SFF_SOFT_RS_SELECT_1G;
-               break;
-       default:
-               hw_dbg(hw, "Invalid fixed module speed\n");
-               return;
-       }
-
-       /* Set RS0 */
-       status = hw->phy.ops.read_i2c_byte(hw, IXGBE_SFF_SFF_8472_OSCB,
-                                          IXGBE_I2C_EEPROM_DEV_ADDR2,
-                                          &eeprom_data);
-       if (status) {
-               hw_dbg(hw, "Failed to read Rx Rate Select RS0\n");
-               goto out;
-       }
-
-       eeprom_data = (eeprom_data & ~IXGBE_SFF_SOFT_RS_SELECT_MASK) | rs;
-
-       status = hw->phy.ops.write_i2c_byte(hw, IXGBE_SFF_SFF_8472_OSCB,
-                                           IXGBE_I2C_EEPROM_DEV_ADDR2,
-                                           eeprom_data);
-       if (status) {
-               hw_dbg(hw, "Failed to write Rx Rate Select RS0\n");
-               goto out;
-       }
-
-       /* Set RS1 */
-       status = hw->phy.ops.read_i2c_byte(hw, IXGBE_SFF_SFF_8472_ESCB,
-                                          IXGBE_I2C_EEPROM_DEV_ADDR2,
-                                          &eeprom_data);
-       if (status) {
-               hw_dbg(hw, "Failed to read Rx Rate Select RS1\n");
-               goto out;
-       }
-
-       eeprom_data = (eeprom_data & ~IXGBE_SFF_SOFT_RS_SELECT_MASK) & rs;
-
-       status = hw->phy.ops.write_i2c_byte(hw, IXGBE_SFF_SFF_8472_ESCB,
-                                           IXGBE_I2C_EEPROM_DEV_ADDR2,
-                                           eeprom_data);
-       if (status) {
-               hw_dbg(hw, "Failed to write Rx Rate Select RS1\n");
-               goto out;
-       }
-out:
-       return;
-}
-
 /**
  *  ixgbe_setup_mac_link_multispeed_fiber - Set MAC link speed
  *  @hw: pointer to hardware structure
@@ -842,10 +773,6 @@ static 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:
-                       ixgbe_set_fiber_fixed_speed(hw,
-                                               IXGBE_LINK_SPEED_1GB_FULL);
-                       break;
                case ixgbe_media_type_fiber:
                        esdp_reg &= ~IXGBE_ESDP_SDP5;
                        esdp_reg |= IXGBE_ESDP_SDP5_DIR;
index 38ca24079980770a5f395a30f0a5b79f5accc0c9..7a9d8744408f3a03d2e7f7ff812d4217b9d22c3c 100644 (file)
@@ -73,7 +73,6 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
        bool link_up;
 
        switch (hw->phy.media_type) {
-       case ixgbe_media_type_fiber_fixed:
        case ixgbe_media_type_fiber:
                hw->mac.ops.check_link(hw, &speed, &link_up, false);
                /* if link is down, assume supported */
@@ -147,7 +146,6 @@ static s32 ixgbe_setup_fc(struct ixgbe_hw *hw)
                        goto out;
 
                /* only backplane uses autoc so fall though */
-       case ixgbe_media_type_fiber_fixed:
        case ixgbe_media_type_fiber:
                reg = IXGBE_READ_REG(hw, IXGBE_PCS1GANA);
 
@@ -2398,7 +2396,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:
                if (speed == IXGBE_LINK_SPEED_1GB_FULL)
                        ret_val = ixgbe_fc_autoneg_fiber(hw);
index 478eca9761ca9f6cdc49ca3d731eb4d85dbfd20f..4a456c974ef2c9d371f1528a5cde1d92c4bd9cfb 100644 (file)
@@ -66,9 +66,6 @@
 #define IXGBE_SFF_1GBASET_CAPABLE              0x8
 #define IXGBE_SFF_10GBASESR_CAPABLE            0x10
 #define IXGBE_SFF_10GBASELR_CAPABLE            0x20
-#define IXGBE_SFF_SOFT_RS_SELECT_MASK          0x8
-#define IXGBE_SFF_SOFT_RS_SELECT_10G           0x8
-#define IXGBE_SFF_SOFT_RS_SELECT_1G            0x0
 #define IXGBE_SFF_ADDRESSING_MODE              0x4
 #define IXGBE_SFF_QSFP_DA_ACTIVE_CABLE         0x1
 #define IXGBE_SFF_QSFP_DA_PASSIVE_CABLE                0x8
@@ -80,7 +77,6 @@
 #define IXGBE_I2C_EEPROM_STATUS_PASS           0x1
 #define IXGBE_I2C_EEPROM_STATUS_FAIL           0x2
 #define IXGBE_I2C_EEPROM_STATUS_IN_PROGRESS    0x3
-
 /* Flow control defines */
 #define IXGBE_TAF_SYM_PAUSE                  0x400
 #define IXGBE_TAF_ASM_PAUSE                  0x800
index 5b0c7307999181b8c5d1fb643cdd542c2c89965e..b5408eb8670b9d72c4c72310b808ee2c0ca5380a 100644 (file)
@@ -2664,7 +2664,6 @@ 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,