ixgbe: add missing configuration for rate select 1
authorEmil Tantilov <emil.s.tantilov@intel.com>
Wed, 17 May 2017 22:17:56 +0000 (15:17 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 31 May 2017 11:52:41 +0000 (04:52 -0700)
Add RS1 configuration to ixgbe_set_soft_rate_select_speed()

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c

index 7af85f505badc97a25a323c63d75b76a4cb53c78..4e35e7017f3de81da022ef3be77c9c8e27634bf6 100644 (file)
@@ -4278,4 +4278,23 @@ void ixgbe_set_soft_rate_select_speed(struct ixgbe_hw *hw,
                hw_dbg(hw, "Failed to write Rx Rate Select RS0\n");
                return;
        }
+
+       /* 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");
+               return;
+       }
+
+       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");
+               return;
+       }
 }