summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorMajd Dibbiny <majd@mellanox.com>2015-06-04 18:30:47 +0200
committerDavid S. Miller <davem@davemloft.net>2015-06-05 01:41:02 +0200
commit647241ea10db87ed0448853fa510177dd89a7a63 (patch)
tree8f8ed8a37d33182e658b0330f7db055e5cf4b01b /drivers/infiniband
parentIB/mlx5: Avoid using the MAD_IFC command under ISSI > 0 mode (diff)
downloadlinux-647241ea10db87ed0448853fa510177dd89a7a63.tar.xz
linux-647241ea10db87ed0448853fa510177dd89a7a63.zip
IB/mlx5: Don't create IB instance over Ethernet ports
Since we still don't have RoCE support in mlx5, avoid creating IB driver instance over Ethernet ports. Signed-off-by: Majd Dibbiny <majd@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/mlx5/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index a117e27b424a..f82969257332 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -1353,6 +1353,10 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev)
int err;
int i;
+ /* don't create IB instance over Eth ports, no RoCE yet! */
+ if (MLX5_CAP_GEN(mdev, port_type) == MLX5_CAP_PORT_TYPE_ETH)
+ return NULL;
+
printk_once(KERN_INFO "%s", mlx5_version);
dev = (struct mlx5_ib_dev *)ib_alloc_device(sizeof(*dev));