OSDN Git Service

ice: store NVM version info in extracted format
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 12 Mar 2020 01:58:12 +0000 (18:58 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 21 Mar 2020 07:28:18 +0000 (00:28 -0700)
commitd4e874448ecee45267cfff32871a32575a20e2f1
treeb69cdead216c5b66d3d2a18efb3042f6432a6f7e
parente94509906d6b7babc44579738bfedf10add16a3b
ice: store NVM version info in extracted format

The NVM version and Option ROM version information is stored within the
struct ice_nvm_ver_info structure. The data for the NVM is stored as
a 2byte value with the major and minor versions each using one byte from
the field. The Option ROM is stored as a 4byte value that contains
a major, build, and patch number.

Modify the code to immediately extract the version values and store them
in a new struct ice_orom_info. Remove the now unnecessary
ice_get_nvm_version function.

Update ice_ethtool.c to use the new fields directly from the structured
data.

This reduces complexity of the code that prints these versions in
ice_ethtool.c

Update the macro definitions and variable names to use the term "orom"
instead of "oem" for the Option ROM version. This helps increase the
clarity of the Option ROM version code.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@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.c
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_type.h