summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mana/cq.c
diff options
context:
space:
mode:
authorKonstantin Taranov <kotaranov@microsoft.com>2024-04-12 10:47:36 +0200
committerLeon Romanovsky <leon@kernel.org>2024-04-16 12:29:47 +0200
commit23f59f4e837bba9db8d25ae85b8455d53b23665b (patch)
treefb23e7752b7e8e8dfb6c9e4e9c1cfff0e21e5bbb /drivers/infiniband/hw/mana/cq.c
parentRDMA/rxe: Return the correct errno (diff)
downloadlinux-23f59f4e837bba9db8d25ae85b8455d53b23665b.tar.xz
linux-23f59f4e837bba9db8d25ae85b8455d53b23665b.zip
RDMA/mana_ib: Use num_comp_vectors of ib_device
Use num_comp_vectors of struct ib_device instead of max_num_queues from gdma_context. Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com> Link: https://lore.kernel.org/r/1712911656-17352-1-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Long Li <longli@microsoft.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/mana/cq.c')
-rw-r--r--drivers/infiniband/hw/mana/cq.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/mana/cq.c b/drivers/infiniband/hw/mana/cq.c
index c9129218f1be..dc931b9c3491 100644
--- a/drivers/infiniband/hw/mana/cq.c
+++ b/drivers/infiniband/hw/mana/cq.c
@@ -12,19 +12,14 @@ int mana_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
struct ib_device *ibdev = ibcq->device;
struct mana_ib_create_cq ucmd = {};
struct mana_ib_dev *mdev;
- struct gdma_context *gc;
int err;
mdev = container_of(ibdev, struct mana_ib_dev, ib_dev);
- gc = mdev_to_gc(mdev);
if (udata->inlen < sizeof(ucmd))
return -EINVAL;
- if (attr->comp_vector > gc->max_num_queues)
- return -EINVAL;
-
- cq->comp_vector = attr->comp_vector;
+ cq->comp_vector = attr->comp_vector % ibdev->num_comp_vectors;
err = ib_copy_from_udata(&ucmd, udata, min(sizeof(ucmd), udata->inlen));
if (err) {