net/mlx5e: Set drvinfo in generic manner
authorParav Pandit <parav@mellanox.com>
Mon, 27 May 2019 09:47:10 +0000 (04:47 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 28 Jun 2019 23:03:59 +0000 (16:03 -0700)
Consider PCI and non PCI device types while setting device name
in get_drvinfo() callback using existing generic device.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Vu Pham <vuhuong@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

index 05f07331ab41f870cade3556250e0d2254c6ad1e..198a52d1e51512932970183ce9e36ba4e5b61ccb 100644 (file)
@@ -46,7 +46,7 @@ void mlx5e_ethtool_get_drvinfo(struct mlx5e_priv *priv,
                 "%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),
+       strlcpy(drvinfo->bus_info, dev_name(mdev->device),
                sizeof(drvinfo->bus_info));
 }