aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMark Bloch <markb@mellanox.com>2019-03-28 15:46:27 +0200
committerJason Gunthorpe <jgg@mellanox.com>2019-04-22 15:24:05 -0300
commit5fb58c9e2fb11edd12379b20be01ee54a7bac026 (patch)
tree6951990ffe933d78a7326774a50bf42c4a6f209d /drivers
parentRDMA/mlx5: Initialize roce port info before multiport master init (diff)
downloadlinux-dev-5fb58c9e2fb11edd12379b20be01ee54a7bac026.tar.xz
linux-dev-5fb58c9e2fb11edd12379b20be01ee54a7bac026.zip
RDMA/mlx5: Don't create IB representors when in multiport RoCE mode
Switchdev mode and mutiport RoCE mode aren't compatible at this point. Don't create IB reps when a user switches to switchdev mode and the driver operates in that mode. Signed-off-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/mlx5/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 795db12e7fa4..d40c39434637 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -6630,7 +6630,8 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev)
if (MLX5_ESWITCH_MANAGER(mdev) &&
mlx5_ib_eswitch_mode(mdev->priv.eswitch) == SRIOV_OFFLOADS) {
- mlx5_ib_register_vport_reps(mdev);
+ if (!mlx5_core_mp_enabled(mdev))
+ mlx5_ib_register_vport_reps(mdev);
return mdev;
}