From 71e44829414064423d4a7da4cf0373a27b7d8143 Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Wed, 21 Dec 2016 17:48:05 +0800 Subject: [PATCH] net/ixgbe/base: remove unneeded MAC type check ixgbe_read_i2c_combined_generic_int() is only used by devices >= X550. Set the initial value accordingly and remove the MAC type check. Signed-off-by: Wei Dai --- drivers/net/ixgbe/base/ixgbe_phy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c index 8901fc11e9..209e9d0a5a 100644 --- a/drivers/net/ixgbe/base/ixgbe_phy.c +++ b/drivers/net/ixgbe/base/ixgbe_phy.c @@ -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; @@ -121,8 +121,6 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg, 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;