net/ice: fix firmware version output
authorShougang Wang <shougangx.wang@intel.com>
Fri, 11 Sep 2020 02:40:41 +0000 (02:40 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:09 +0000 (18:55 +0200)
Kernel driver shows firmware version as hex but ice PMD shows
as decimal. This patch fixes the issue to make consistent with
kernel driver.

Fixes: f9204d8a23c3 ("net/ice: fix firmware version result of ethtool")
Cc: stable@dpdk.org
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/ice_ethdev.c

index 724b2ee..8fb4b30 100644 (file)
@@ -4415,7 +4415,7 @@ ice_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
        build = hw->nvm.orom.build;
 
        ret = snprintf(fw_version, fw_size,
-                       "%d.%d 0x%08x %d.%d.%d",
+                       "%x.%02x 0x%08x %d.%d.%d",
                        hw->nvm.major_ver,
                        hw->nvm.minor_ver,
                        hw->nvm.eetrack,