ice: implement full NVM read from ETHTOOL_GEEPROM
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Thu, 12 Mar 2020 01:58:14 +0000 (18:58 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 21 Mar 2020 07:31:17 +0000 (00:31 -0700)
commit84a2479822ddc94845ca3f6a9874106b694eb1ed
tree8308b72bb93d0a65d540d26469379f26057cf393
parent81f07491e2bf264a871c319c70679c55230baebd
ice: implement full NVM read from ETHTOOL_GEEPROM

The current implementation of .get_eeprom only enables reading from the
Shadow RAM portion of the NVM contents. Implement support for reading
the entire flash contents instead of only the initial portion contained
in the Shadow RAM.

A complete dump can take several seconds, but the ETHTOOL_GEEPROM ioctl
is capable of reading only a limited portion at a time by specifying the
offset and length to read.

In order to perform the reads directly, several functions are made non
static. Additionally, the unused ice_read_sr_buf_aq and ice_read_sr_buf
functions are removed.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_common.h
drivers/net/ethernet/intel/ice/ice_ethtool.c
drivers/net/ethernet/intel/ice/ice_nvm.c
drivers/net/ethernet/intel/ice/ice_nvm.h