net/mlx5e: Show board id in ethtool driver information
authorInbar Karmy <inbark@mellanox.com>
Mon, 13 Mar 2017 13:36:57 +0000 (15:36 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 6 Apr 2017 22:21:26 +0000 (01:21 +0300)
Add the board id (PSID) to the firmware-version field
in the ethtool -i (driver information).
The PSID is shown in parentheses, next to the fw-version.

$ ethtool -i ens6
firmware-version: 12.14.1101 (MT_2190110032)

Signed-off-by: Inbar Karmy <inbark@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

index 167a8379156e11a9f1c3395000cb9fc7c3b17be5..ce7b09d72ff68b1850f6df3845f2fd9ae7f57bbd 100644 (file)
@@ -42,8 +42,9 @@ static void mlx5e_get_drvinfo(struct net_device *dev,
        strlcpy(drvinfo->version, DRIVER_VERSION " (" DRIVER_RELDATE ")",
                sizeof(drvinfo->version));
        snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version),
-                "%d.%d.%04d",
-                fw_rev_maj(mdev), fw_rev_min(mdev), fw_rev_sub(mdev));
+                "%d.%d.%04d (%.16s)",
+                fw_rev_maj(mdev), fw_rev_min(mdev), fw_rev_sub(mdev),
+                mdev->board_id);
        strlcpy(drvinfo->bus_info, pci_name(mdev->pdev),
                sizeof(drvinfo->bus_info));
 }