]> asedeno.scripts.mit.edu Git - linux.git/commit
i40e: Check if transceiver implements DDM before access
authorMauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>
Thu, 18 Jul 2019 17:52:02 +0000 (14:52 -0300)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 22 Aug 2019 20:24:13 +0000 (13:24 -0700)
commitbc6c1eaaedee7bb1bbdef27e155f15510128762e
tree6df3e9af9ebf4dda84bb9eb9c1109ba6438311dc
parent33b165684ab70867d4545643f550a5d48d3ddc57
i40e: Check if transceiver implements DDM before access

Similar to the ixgbe issue fixed in:
655c91414579 ("ixgbe: Check DDM existence in transceiver before access)

i40e has the same issue when reading eeprom from SFP's module that comply
with SFF-8472 but not implement the Digital Diagnostic Monitoring (DDM)
interface described in it. The existence of such area is specified by bit
6 of byte 92, set to 1 if implemented.

Without this patch, due to not checking this bit i40e fails to read SFP
module's eeprom with the follow message:

ethtool -m enP51p1s0f0
Cannot get Module EEPROM data: Input/output error

Because it fails to read the additional 256 bytes in which it was assumed
to exist the DDM data.

Signed-off-by: "Mauro S. M. Rodrigues" <maurosr@linux.vnet.ibm.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_type.h