From: Mark Rustad Date: Sat, 8 Aug 2015 23:18:17 +0000 (-0700) Subject: ixgbe: Clear I2C destination location X-Git-Tag: v4.1.12-92~262^2~18 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ba481513097b196e62b54d39a52b9e7ed33e01a0;p=users%2Fjedix%2Flinux-maple.git ixgbe: Clear I2C destination location Orabug: 21918732 Clear the destination location for I2C data initially so that the received data will not be affected by previous attempts. This could have returned wrong data in certain retry sequences. Signed-off-by: Mark Rustad Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher (cherry picked from commit 6ee8c9a70d65ee37251465348501a067138050d7) Signed-off-by: Brian Maly --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c index 315f0597fbc0..88ade175185a 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c @@ -2026,6 +2026,7 @@ static s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data) s32 i; bool bit = false; + *data = 0; for (i = 7; i >= 0; i--) { ixgbe_clock_in_i2c_bit(hw, &bit); *data |= bit << i;