Commit ac24382d authored by Carolyn Wyborny's avatar Carolyn Wyborny Committed by Jeff Kirsher

i40e/i40evf: Add info to nvm info struct for OEM version data

This patch adds a member to the nvm_info struct for oem_ver info to be
output either by OID or ethtool.

Change-ID: I1e5d513ae67622e2af17042924fdb4b5d6d85366
Signed-off-by: default avatarCarolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 14e52ee2
...@@ -553,8 +553,9 @@ static i40e_status i40e_shutdown_arq(struct i40e_hw *hw) ...@@ -553,8 +553,9 @@ static i40e_status i40e_shutdown_arq(struct i40e_hw *hw)
**/ **/
i40e_status i40e_init_adminq(struct i40e_hw *hw) i40e_status i40e_init_adminq(struct i40e_hw *hw)
{ {
i40e_status ret_code; u16 cfg_ptr, oem_hi, oem_lo;
u16 eetrack_lo, eetrack_hi; u16 eetrack_lo, eetrack_hi;
i40e_status ret_code;
int retry = 0; int retry = 0;
/* verify input for valid configuration */ /* verify input for valid configuration */
...@@ -613,6 +614,12 @@ i40e_status i40e_init_adminq(struct i40e_hw *hw) ...@@ -613,6 +614,12 @@ i40e_status i40e_init_adminq(struct i40e_hw *hw)
i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, &eetrack_lo); i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, &eetrack_lo);
i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi); i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi);
hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo; hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo;
i40e_read_nvm_word(hw, I40E_SR_BOOT_CONFIG_PTR, &cfg_ptr);
i40e_read_nvm_word(hw, (cfg_ptr + I40E_NVM_OEM_VER_OFF),
&oem_hi);
i40e_read_nvm_word(hw, (cfg_ptr + (I40E_NVM_OEM_VER_OFF + 1)),
&oem_lo);
hw->nvm.oem_ver = ((u32)oem_hi << 16) | oem_lo;
if (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) { if (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) {
ret_code = I40E_ERR_FIRMWARE_API_VERSION; ret_code = I40E_ERR_FIRMWARE_API_VERSION;
......
...@@ -289,6 +289,7 @@ struct i40e_nvm_info { ...@@ -289,6 +289,7 @@ struct i40e_nvm_info {
bool blank_nvm_mode; /* is NVM empty (no FW present)*/ bool blank_nvm_mode; /* is NVM empty (no FW present)*/
u16 version; /* NVM package version */ u16 version; /* NVM package version */
u32 eetrack; /* NVM data version */ u32 eetrack; /* NVM data version */
u32 oem_ver; /* OEM version info */
}; };
/* definitions used in NVM update support */ /* definitions used in NVM update support */
...@@ -1204,6 +1205,8 @@ struct i40e_hw_port_stats { ...@@ -1204,6 +1205,8 @@ struct i40e_hw_port_stats {
#define I40E_SR_EMP_MODULE_PTR 0x0F #define I40E_SR_EMP_MODULE_PTR 0x0F
#define I40E_SR_PBA_FLAGS 0x15 #define I40E_SR_PBA_FLAGS 0x15
#define I40E_SR_PBA_BLOCK_PTR 0x16 #define I40E_SR_PBA_BLOCK_PTR 0x16
#define I40E_SR_BOOT_CONFIG_PTR 0x17
#define I40E_NVM_OEM_VER_OFF 0x83
#define I40E_SR_NVM_DEV_STARTER_VERSION 0x18 #define I40E_SR_NVM_DEV_STARTER_VERSION 0x18
#define I40E_SR_NVM_WAKE_ON_LAN 0x19 #define I40E_SR_NVM_WAKE_ON_LAN 0x19
#define I40E_SR_ALTERNATE_SAN_MAC_ADDRESS_PTR 0x27 #define I40E_SR_ALTERNATE_SAN_MAC_ADDRESS_PTR 0x27
......
...@@ -288,6 +288,7 @@ struct i40e_nvm_info { ...@@ -288,6 +288,7 @@ struct i40e_nvm_info {
bool blank_nvm_mode; /* is NVM empty (no FW present)*/ bool blank_nvm_mode; /* is NVM empty (no FW present)*/
u16 version; /* NVM package version */ u16 version; /* NVM package version */
u32 eetrack; /* NVM data version */ u32 eetrack; /* NVM data version */
u32 oem_ver; /* OEM version info */
}; };
/* definitions used in NVM update support */ /* definitions used in NVM update support */
...@@ -1173,6 +1174,7 @@ struct i40e_hw_port_stats { ...@@ -1173,6 +1174,7 @@ struct i40e_hw_port_stats {
/* Checksum and Shadow RAM pointers */ /* Checksum and Shadow RAM pointers */
#define I40E_SR_NVM_CONTROL_WORD 0x00 #define I40E_SR_NVM_CONTROL_WORD 0x00
#define I40E_SR_EMP_MODULE_PTR 0x0F #define I40E_SR_EMP_MODULE_PTR 0x0F
#define I40E_NVM_OEM_VER_OFF 0x83
#define I40E_SR_NVM_DEV_STARTER_VERSION 0x18 #define I40E_SR_NVM_DEV_STARTER_VERSION 0x18
#define I40E_SR_NVM_WAKE_ON_LAN 0x19 #define I40E_SR_NVM_WAKE_ON_LAN 0x19
#define I40E_SR_ALTERNATE_SAN_MAC_ADDRESS_PTR 0x27 #define I40E_SR_ALTERNATE_SAN_MAC_ADDRESS_PTR 0x27
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment