ixgbe: Reduce I2C retry count on X550 devices
Subsystems (2)
Tony Nguyen
maintainerPATCH 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.
--- drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +4 -0
@@ -121,6 +121,8 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr,u8 reg_high;u8 csum; +if (hw->mac.type >= ixgbe_mac_X550) + max_retry =3 ; reg_high = ((reg >>7 ) &0xFE ) |1 ;/* Indicate read combined */ csum =ixgbe_ones_comp_byte_add (reg_high, reg &0xFF ); csum = ~csum;
@@ -1756,6 +1758,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
Rustad
PATCH 1/1 ixgbe: Reduce I2C retry count on X550 devices
Quoted 4 lines · Tony Nguyen
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.
There is no reason to check the MAC type. There are no devices prior to X550 that can use I2C combined bus cycles - the CS4227 on Xeon D is the only one. So just change the retry count if that is what is needed. There is no need to make it conditional.
Quoted 22 lines
Signed-off-by Tony Nguyen <[email protected]>--- drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +2
-0@@ -121,6 +121,8 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u8 reg_high;u8 csum; +if (hw->mac.type >= ixgbe_mac_X550) + max_retry =3 ; reg_high = ((reg >>7 ) &0xFE ) |1 ;/* Indicate read combined */ csum =ixgbe_ones_comp_byte_add (reg_high, reg &0xFF );drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +0
-0csum = ~csum;
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c static s32 ixgbe_read_i2c_byte_generic_int(struct · line 1765
Quoted 8 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +2
-0@@ -1756,6 +1758,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 ;
--
Mark Rustad, Networking Division, Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20161109/27c27cd1/attachment.asc>
Rustad
PATCH 1/1 ixgbe: Reduce I2C retry count on X550 devices
I should have been more specific in my previous message. See below:
Quoted 27 lines · Mark D
Quoted 4 lines · Tony Nguyen
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.
There is no reason to check the MAC type. There are no devices prior to X550 that can use I2C combined bus cycles - the CS4227 on Xeon D is the only one. So just change the retry count if that is what is needed. There is no need to make it conditional.
Quoted 15 lines
Signed-off-by Tony Nguyen <[email protected]>--- drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +0
-0@@ -121,6 +121,8 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u8 reg_high;u8 csum;
Quoted 2 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c s32 ixgbe_read_i2c_combined_generic_int(struct · line 126
Quoted 2 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +2
-0+if (hw->mac.type >= ixgbe_mac_X550) + max_retry =3 ;
This MAC check is not needed, because this function can only be used with MACs >= X550. So, the normal retry should just be changed.
Quoted 10 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c static s32 ixgbe_read_i2c_byte_generic_int(struct · line 1763
Quoted 10 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +0
-0reg_high = ((reg >>7 ) &0xFE ) |1 ;/* Indicate read combined */ csum =ixgbe_ones_comp_byte_add (reg_high, reg &0xFF );drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +2
-0csum = ~csum;@@ -1756,6 +1758,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 ;
This MAC check is needed, because we don't want to change the behavior of older devices. This I2C path is used with many of the MACs, so this is as it should be.
Quoted 2 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c static s32 ixgbe_read_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset, · line 1764
Quoted 2 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +0
-0if (ixgbe_is_sfp_probe (hw, byte_offset, dev_addr)) max_retry =IXGBE_SFP_DETECT_RETRIES ;
--
Mark Rustad, Networking Division, Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20161110/39f8c82d/attachment.asc>