net/mlx5e: Change FW sub_minor display to 4 zeros padding
authorEran Ben Elisha <eranbe@mellanox.com>
Thu, 2 Feb 2017 13:19:34 +0000 (15:19 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 6 Apr 2017 22:21:25 +0000 (01:21 +0300)
FW version should be reported as X.Y.ZZZZ, add leading zeroes to sub
minor in order to fix it.

Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

index af039b6c0799d4f2e988ce91939ed388dca86375..167a8379156e11a9f1c3395000cb9fc7c3b17be5 100644 (file)
@@ -42,7 +42,7 @@ 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.%d",
+                "%d.%d.%04d",
                 fw_rev_maj(mdev), fw_rev_min(mdev), fw_rev_sub(mdev));
        strlcpy(drvinfo->bus_info, pci_name(mdev->pdev),
                sizeof(drvinfo->bus_info));