net/mlx5: Report PCIe link properties with pcie_print_link_status()
authorTal Gilboa <talgi@mellanox.com>
Fri, 30 Mar 2018 14:01:34 +0000 (09:01 -0500)
committerBjorn Helgaas <helgaas@kernel.org>
Tue, 3 Apr 2018 13:58:32 +0000 (08:58 -0500)
Use pcie_print_link_status() to report PCIe link speed and possible
limitations.

Signed-off-by: Tal Gilboa <talgi@mellanox.com>
[bhelgaas: changelog]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/main.c

index 2ef641c..622f02d 100644 (file)
@@ -1043,6 +1043,10 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv,
        dev_info(&pdev->dev, "firmware version: %d.%d.%d\n", fw_rev_maj(dev),
                 fw_rev_min(dev), fw_rev_sub(dev));
 
+       /* Only PFs hold the relevant PCIe information for this query */
+       if (mlx5_core_is_pf(dev))
+               pcie_print_link_status(dev->pdev);
+
        /* on load removing any previous indication of internal error, device is
         * up
         */