diff options
author | Emil Tantilov <emil.s.tantilov@intel.com> | 2012-12-19 07:14:17 +0000 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-02-05 00:47:13 -0800 |
commit | 07ce870bed2f631ad53a2c1a90db20b5f8126ab9 (patch) | |
tree | 768a2c0590a6e2a722543826cdeacf1f1115f439 /drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | |
parent | a7a1d9da2980c2e86eba78d89a156f0b9d04ed4a (diff) | |
download | op-kernel-dev-07ce870bed2f631ad53a2c1a90db20b5f8126ab9.zip op-kernel-dev-07ce870bed2f631ad53a2c1a90db20b5f8126ab9.tar.gz |
ixgbe: allow reading of SFF-8472 data over i2c
This patch adds functions needed for reading SFF-8472 diagnostic data
from SFP modules.
Based on original patch from Aurélien Guillaume <footplus@gmail.com>
CC: Aurélien Guillaume <footplus@gmail.com>
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 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c index f4b2c0d..d034cc5 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c @@ -1204,6 +1204,22 @@ s32 ixgbe_read_i2c_eeprom_generic(struct ixgbe_hw *hw, u8 byte_offset, } /** + * ixgbe_read_i2c_sff8472_generic - Reads 8 bit word over I2C interface + * @hw: pointer to hardware structure + * @byte_offset: byte offset at address 0xA2 + * @eeprom_data: value read + * + * Performs byte read operation to SFP module's SFF-8472 data over I2C + **/ +s32 ixgbe_read_i2c_sff8472_generic(struct ixgbe_hw *hw, u8 byte_offset, + u8 *sff8472_data) +{ + return hw->phy.ops.read_i2c_byte(hw, byte_offset, + IXGBE_I2C_EEPROM_DEV_ADDR2, + sff8472_data); +} + +/** * ixgbe_write_i2c_eeprom_generic - Writes 8 bit EEPROM word over I2C interface * @hw: pointer to hardware structure * @byte_offset: EEPROM byte offset to write |