diff options
author | Emil Tantilov <emil.s.tantilov@intel.com> | 2013-01-18 02:16:41 +0000 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-02-15 23:16:09 -0800 |
commit | d0310dc415a670ae2b2e27076b4685d988830479 (patch) | |
tree | 400b27b6a6371faa044e3f8f91003ed7fe3136c3 | |
parent | 4c696ca9fbabc5f94a3c6db7f009e73f0ef21831 (diff) | |
download | linux-stable-d0310dc415a670ae2b2e27076b4685d988830479.tar.gz linux-stable-d0310dc415a670ae2b2e27076b4685d988830479.tar.bz2 linux-stable-d0310dc415a670ae2b2e27076b4685d988830479.zip |
ixgbe: fix possible data corruption in read_i2c_byte
This patch makes sure that the SW lock is released after all i2c
operations complete in the retry code path.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c index eb534a071fde..d7b5bd047604 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c @@ -1307,9 +1307,9 @@ s32 ixgbe_read_i2c_byte_generic(struct ixgbe_hw *hw, u8 byte_offset, break; fail: + ixgbe_i2c_bus_clear(hw); hw->mac.ops.release_swfw_sync(hw, swfw_mask); msleep(100); - ixgbe_i2c_bus_clear(hw); retry++; if (retry < max_retry) hw_dbg(hw, "I2C byte read error - Retrying.\n"); |