aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mlx4/main.c')
-rw-r--r--drivers/net/mlx4/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index 468921b8f4b6..90a0281d15ea 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -753,6 +753,7 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
753 struct mlx4_priv *priv = mlx4_priv(dev); 753 struct mlx4_priv *priv = mlx4_priv(dev);
754 int err; 754 int err;
755 int port; 755 int port;
756 __be32 ib_port_default_caps;
756 757
757 err = mlx4_init_uar_table(dev); 758 err = mlx4_init_uar_table(dev);
758 if (err) { 759 if (err) {
@@ -852,6 +853,13 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
852 } 853 }
853 854
854 for (port = 1; port <= dev->caps.num_ports; port++) { 855 for (port = 1; port <= dev->caps.num_ports; port++) {
856 ib_port_default_caps = 0;
857 err = mlx4_get_port_ib_caps(dev, port, &ib_port_default_caps);
858 if (err)
859 mlx4_warn(dev, "failed to get port %d default "
860 "ib capabilities (%d). Continuing with "
861 "caps = 0\n", port, err);
862 dev->caps.ib_port_def_cap[port] = ib_port_default_caps;
855 err = mlx4_SET_PORT(dev, port); 863 err = mlx4_SET_PORT(dev, port);
856 if (err) { 864 if (err) {
857 mlx4_err(dev, "Failed to set port %d, aborting\n", 865 mlx4_err(dev, "Failed to set port %d, aborting\n",