]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: Clear I2C destination location
authorMark Rustad <mark.d.rustad@intel.com>
Sat, 8 Aug 2015 23:18:17 +0000 (16:18 -0700)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 12 Oct 2015 16:05:01 +0000 (09:05 -0700)
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 <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 6ee8c9a70d65ee37251465348501a067138050d7)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c

index 315f0597fbc021c58cb362bd30bfec9b035b3b48..88ade175185af4e7b4368f061adda2f0eef73d90 100644 (file)
@@ -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;