diff options
author | Emil Tantilov <emil.s.tantilov@intel.com> | 2011-08-30 09:33:51 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-10-05 05:53:24 -0400 |
commit | 3fbaa3ac0d47e0cbad9bb65f0b71a5ce3ef1b76c (patch) | |
tree | a69f27c7455ec06e7b23adb759d966f3409e1a25 /drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | |
parent | 7edebf9a6aac07e2ebb3901b60672293a7139ad0 (diff) |
ixgbe: clear the data field in ixgbe_read_i2c_byte_generic
Clear the data field in ixgbe_read_i2c_byte_generic so it does not
accumulate 1 bit using the same variable multiple times.
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>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c index f7ca3511b9fe..cf3c227f9643 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | |||
@@ -1205,7 +1205,7 @@ s32 ixgbe_write_i2c_eeprom_generic(struct ixgbe_hw *hw, u8 byte_offset, | |||
1205 | * @data: value read | 1205 | * @data: value read |
1206 | * | 1206 | * |
1207 | * Performs byte read operation to SFP module's EEPROM over I2C interface at | 1207 | * Performs byte read operation to SFP module's EEPROM over I2C interface at |
1208 | * a specified deivce address. | 1208 | * a specified device address. |
1209 | **/ | 1209 | **/ |
1210 | s32 ixgbe_read_i2c_byte_generic(struct ixgbe_hw *hw, u8 byte_offset, | 1210 | s32 ixgbe_read_i2c_byte_generic(struct ixgbe_hw *hw, u8 byte_offset, |
1211 | u8 dev_addr, u8 *data) | 1211 | u8 dev_addr, u8 *data) |
@@ -1215,6 +1215,7 @@ s32 ixgbe_read_i2c_byte_generic(struct ixgbe_hw *hw, u8 byte_offset, | |||
1215 | u32 retry = 0; | 1215 | u32 retry = 0; |
1216 | u16 swfw_mask = 0; | 1216 | u16 swfw_mask = 0; |
1217 | bool nack = 1; | 1217 | bool nack = 1; |
1218 | *data = 0; | ||
1218 | 1219 | ||
1219 | if (IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1) | 1220 | if (IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1) |
1220 | swfw_mask = IXGBE_GSSR_PHY1_SM; | 1221 | swfw_mask = IXGBE_GSSR_PHY1_SM; |