net/ixgbe/base: remove unneeded MAC type check
authorWei Dai <wei.dai@intel.com>
Wed, 21 Dec 2016 09:48:05 +0000 (17:48 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Jan 2017 18:40:51 +0000 (19:40 +0100)
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 <wei.dai@intel.com>
drivers/net/ixgbe/base/ixgbe_phy.c

index 8901fc1..209e9d0 100644 (file)
@@ -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;