]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
bnx2x: Add storm FW version to ethtool driver query output.
authorSudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>
Tue, 27 Nov 2018 06:25:57 +0000 (22:25 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Nov 2018 00:41:19 +0000 (16:41 -0800)
The patch populates the Storm FW version in the ethtool driver query data.

Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c

index 68aae3ee31eae9c1fa1a470d18f440e76f47016a..749d0ef4437171ad6ebc83bfa10a006eccef8da9 100644 (file)
@@ -1112,6 +1112,12 @@ static void bnx2x_get_drvinfo(struct net_device *dev,
        strlcpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver));
        strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version));
 
+       memset(version, 0, sizeof(version));
+       snprintf(version, ETHTOOL_FWVERS_LEN, " storm %d.%d.%d.%d",
+                BCM_5710_FW_MAJOR_VERSION, BCM_5710_FW_MINOR_VERSION,
+                BCM_5710_FW_REVISION_VERSION, BCM_5710_FW_ENGINEERING_VERSION);
+       strlcat(info->version, version, sizeof(info->version));
+
        if (SHMEM2_HAS(bp, extended_dev_info_shared_addr)) {
                ext_dev_info_offset = SHMEM2_RD(bp,
                                                extended_dev_info_shared_addr);