Skip to content

Commit 12ec51a

Browse files
anguy11gregkh
authored andcommitted
ixgbe: Reduce I2C retry count on X550 devices
[ Upstream commit 3f0d646b720d541309b11e190db58086f446f41e ] A retry count of 10 is likely to run into problems on X550 devices that have to detect and reset unresponsive CS4227 devices. So, reduce the I2C retry count to 3 for X550 and above. This should avoid any possible regressions in existing devices. Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9d51db4 commit 12ec51a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr,
113113
u16 reg, u16 *val, bool lock)
114114
{
115115
u32 swfw_mask = hw->phy.phy_semaphore_mask;
116-
int max_retry = 10;
116+
int max_retry = 3;
117117
int retry = 0;
118118
u8 csum_byte;
119119
u8 high_bits;
@@ -1764,6 +1764,8 @@ static s32 ixgbe_read_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset,
17641764
u32 swfw_mask = hw->phy.phy_semaphore_mask;
17651765
bool nack = true;
17661766

1767+
if (hw->mac.type >= ixgbe_mac_X550)
1768+
max_retry = 3;
17671769
if (ixgbe_is_sfp_probe(hw, byte_offset, dev_addr))
17681770
max_retry = IXGBE_SFP_DETECT_RETRIES;
17691771

0 commit comments

Comments
 (0)