summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5/srq.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2020-07-06 15:27:14 +0300
committerJason Gunthorpe <jgg@nvidia.com>2020-07-06 19:32:23 -0300
commitf4375443b7861ca5d93a10dba5ef5a478d5df96a (patch)
tree1303c266b70e8ca0ae14db94dc94a5be2a0a1668 /drivers/infiniband/hw/mlx5/srq.c
parent42a3b153966c9cd9a90f6a669d1ffed7fef2d325 (diff)
downloadlinux-stable-f4375443b7861ca5d93a10dba5ef5a478d5df96a.tar.gz
linux-stable-f4375443b7861ca5d93a10dba5ef5a478d5df96a.tar.bz2
linux-stable-f4375443b7861ca5d93a10dba5ef5a478d5df96a.zip
RDMA/mlx5: Get XRCD number directly for the internal use
The mlx5_ib creates XRC domain and uses for creating internal SRQ. However all that is needed is XRCD number and not full blown ib_xrcd objects. Update the code to get and store the number only. Link: https://lore.kernel.org/r/20200706122716.647338-2-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/srq.c')
-rw-r--r--drivers/infiniband/hw/mlx5/srq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx5/srq.c b/drivers/infiniband/hw/mlx5/srq.c
index 6d1ff13d2283..7e10cbcb6d5c 100644
--- a/drivers/infiniband/hw/mlx5/srq.c
+++ b/drivers/infiniband/hw/mlx5/srq.c
@@ -274,10 +274,10 @@ int mlx5_ib_create_srq(struct ib_srq *ib_srq,
if (srq->wq_sig)
in.flags |= MLX5_SRQ_FLAG_WQ_SIG;
- if (init_attr->srq_type == IB_SRQT_XRC)
+ if (init_attr->srq_type == IB_SRQT_XRC && init_attr->ext.xrc.xrcd)
in.xrcd = to_mxrcd(init_attr->ext.xrc.xrcd)->xrcdn;
else
- in.xrcd = to_mxrcd(dev->devr.x0)->xrcdn;
+ in.xrcd = dev->devr.xrcdn0;
if (init_attr->srq_type == IB_SRQT_TM) {
in.tm_log_list_size =