path: root/drivers/infiniband
diff options
authorPotnuri Bharat Teja <>2021-04-15 20:44:22 +0530
committerJason Gunthorpe <>2021-04-20 09:36:00 -0300
commit3a6684385928d00b29acac7658a5ae1f2a44494c (patch)
treeac1389998c7248126d166247b0749e259d95d7c1 /drivers/infiniband
parent9480fd557be4781ea2f3d50b148218bcad826284 (diff)
RDMA/cxgb4: add missing qpid increment
missing qpid increment leads to skipping few qpids while allocating QP. This eventually leads to adapter running out of qpids after establishing fewer connections than it actually supports. Current patch increments the qpid correctly. Fixes: cfdda9d76436 ("RDMA/cxgb4: Add driver for Chelsio T4 RNIC") Link: Signed-off-by: Potnuri Bharat Teja <> Signed-off-by: Jason Gunthorpe <>
Diffstat (limited to 'drivers/infiniband')
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/resource.c b/drivers/infiniband/hw/cxgb4/resource.c
index 5c95c789f302..e800e8e8bed5 100644
--- a/drivers/infiniband/hw/cxgb4/resource.c
+++ b/drivers/infiniband/hw/cxgb4/resource.c
@@ -216,7 +216,7 @@ u32 c4iw_get_qpid(struct c4iw_rdev *rdev, struct c4iw_dev_ucontext *uctx)
goto out;
entry->qid = qid;
list_add_tail(&entry->entry, &uctx->cqids);
- for (i = qid; i & rdev->qpmask; i++) {
+ for (i = qid + 1; i & rdev->qpmask; i++) {
entry = kmalloc(sizeof(*entry), GFP_KERNEL);
if (!entry)
goto out;