Skip to contentSkip to conversation

ixgbe: Reduce I2C retry count on X550 devices

PATCH New Tony Nguyen 2 participants 2 messages Nov 10, 2016 – Dec 7, 2016

Subsystems (2)
lore
Share & tools
lore

Tony Nguyen

author maintainer
#0 lore raw

PATCH v2 1/1 ixgbe: Reduce I2C retry count on X550 devices

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.

---

v2 -
Removed mac check in ixgbe_read_i2c_combined_generic_int(); set initial max_retry value to 3 instead.

 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +3 -1
index 4aa6793..e0fc147 100644
@@ -113,7 +113,7 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr,
 					u16 reg, u16 *val, bool lock)
 {
 	u32 swfw_mask = hw->phy.phy_semaphore_mask;
-	int max_retry = 10;
+	int max_retry = 3;
 	int retry = 0;
 	u8 csum_byte;
 	u8 high_bits;
@@ -1756,6 +1756,8 @@ static s32 ixgbe_read_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset,
 	u32 swfw_mask = hw->phy.phy_semaphore_mask;
 	bool nack = true;
 
+	if (hw->mac.type >= ixgbe_mac_X550)
+		max_retry = 3;
 	if (ixgbe_is_sfp_probe(hw, byte_offset, dev_addr))
 		max_retry = IXGBE_SFP_DETECT_RETRIES;
 
Signature · 1 line
2.4.0
#1 lore raw

PATCH v2 1/1 ixgbe: Reduce I2C retry count on X550 devices

Quoted 14 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Tony Nguyen
Sent: Thursday, November 10, 2016 9:57 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH v2] ixgbe: Reduce I2C retry count on X550 devices

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.

Quoted 8 lines

---

v2 -
Removed mac check in ixgbe_read_i2c_combined_generic_int(); set initial max_retry value to 3 instead.

 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)