i40e/i40evf: print FW build number in version string
Include the FW build number in the formatted FW version string. In order to fit within ethtool's 32 character limit, the etrack's unused high order bits are trimmed as is the leading 0 for the NVM version. This leaves us with 2 character left for if/when the etrack id goes to 5 hex chars and the NVM major number goes to 2 chars. Change-ID: Icb004c4b9b14a2f54dd200b467fcc1d7b9297308 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Этот коммит содержится в:

коммит произвёл
Jeff Kirsher

родитель
d40d00b1c2
Коммит
7edf810c61
@@ -557,14 +557,14 @@ static inline char *i40e_fw_version_str(struct i40e_hw *hw)
|
||||
static char buf[32];
|
||||
|
||||
snprintf(buf, sizeof(buf),
|
||||
"f%d.%d a%d.%d n%02x.%02x e%08x",
|
||||
hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
|
||||
"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,
|
||||
(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);
|
||||
(hw->nvm.eetrack & 0xffffff));
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
Ссылка в новой задаче
Block a user