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 <wei.dai@intel.com>
This commit is contained in:
parent
a2fdf99edf
commit
71e4482941
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user