1
0
Fork 0

i40e: update fw version text string per previous product formats

This patch moves the internal fw version and fw api version info to be
output in probe.  The nvm version, etrack and oem version info are now
configured for output via ethtool -i.

Change-ID: I05d490093a7137dbefcdef263d014d1e5c9e83d0
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
hifive-unleashed-5.1
Carolyn Wyborny 2015-08-31 19:54:49 -04:00 committed by Jeff Kirsher
parent 21be99ec4e
commit f0b4444014
2 changed files with 13 additions and 4 deletions

View File

@ -107,6 +107,8 @@
#define I40E_NVM_VERSION_LO_MASK (0xff << I40E_NVM_VERSION_LO_SHIFT)
#define I40E_NVM_VERSION_HI_SHIFT 12
#define I40E_NVM_VERSION_HI_MASK (0xf << I40E_NVM_VERSION_HI_SHIFT)
#define I40E_OEM_VER_BUILD_MASK 0xff00
#define I40E_OEM_VER_PATCH_MASK 0xff
/* The values in here are decimal coded as hex as is the case in the NVM map*/
#define I40E_CURRENT_NVM_VERSION_HI 0x2
@ -587,14 +589,14 @@ static inline char *i40e_fw_version_str(struct i40e_hw *hw)
static char buf[32];
snprintf(buf, sizeof(buf),
"f%d.%d.%05d a%d.%d n%x.%02x e%x",
hw->aq.fw_maj_ver, hw->aq.fw_min_ver, hw->aq.fw_build,
hw->aq.api_maj_ver, hw->aq.api_min_ver,
"%x.%02x 0x%x %d.%d.%d",
(hw->nvm.version & I40E_NVM_VERSION_HI_MASK) >>
I40E_NVM_VERSION_HI_SHIFT,
(hw->nvm.version & I40E_NVM_VERSION_LO_MASK) >>
I40E_NVM_VERSION_LO_SHIFT,
(hw->nvm.eetrack & 0xffffff));
hw->nvm.eetrack, (hw->nvm.oem_ver >> 24),
(hw->nvm.oem_ver & I40E_OEM_VER_BUILD_MASK) >> 8,
hw->nvm.oem_ver & I40E_OEM_VER_PATCH_MASK);
return buf;
}

View File

@ -10064,6 +10064,13 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err = i40e_init_adminq(hw);
dev_info(&pdev->dev, "%s\n", i40e_fw_version_str(hw));
/* provide additional fw info, like api and ver */
dev_info(&pdev->dev, "fw_version:%d.%d.%05d\n",
hw->aq.fw_maj_ver, hw->aq.fw_min_ver, hw->aq.fw_build);
dev_info(&pdev->dev, "fw api version:%d.%d\n",
hw->aq.api_maj_ver, hw->aq.api_min_ver);
if (err) {
dev_info(&pdev->dev,
"The driver for the device stopped because the NVM image is newer than expected. You must install the most recent version of the network driver.\n");