Commit 6ee8c9a7 authored by Mark Rustad's avatar Mark Rustad Committed by Jeff Kirsher

ixgbe: Clear I2C destination location

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: default avatarMark Rustad <mark.d.rustad@intel.com>
Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 06e60e59
...@@ -2026,6 +2026,7 @@ static s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data) ...@@ -2026,6 +2026,7 @@ static s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data)
s32 i; s32 i;
bool bit = false; bool bit = false;
*data = 0;
for (i = 7; i >= 0; i--) { for (i = 7; i >= 0; i--) {
ixgbe_clock_in_i2c_bit(hw, &bit); ixgbe_clock_in_i2c_bit(hw, &bit);
*data |= bit << i; *data |= bit << i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment