From: Wei Dai Date: Wed, 21 Dec 2016 09:48:05 +0000 (+0800) Subject: net/ixgbe/base: remove unneeded MAC type check X-Git-Tag: spdx-start~4940 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=71e44829414064423d4a7da4cf0373a27b7d8143;p=dpdk.git 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 --- 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;