]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
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)
committerJack Vogel <jack.vogel@oracle.com>
Fri, 16 Jun 2017 06:01:24 +0000 (23:01 -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>
Orabug: 26242766
(cherry picked from commit 3ce5cb75f39378e3b77628352735632ccc98b489)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Ethan Zhao <ethan.zhao@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c

index 04c7dd2dc2ee21167ac78bbca97e33737f439433..d4933d22b7fe2f42a68dff0b66a22c167ef8f2b2 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;
+       }
 }