Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4fa45725 authored by Jon Mason's avatar Jon Mason Committed by Roland Dreier
Browse files

RDMA/cxgb3: Fix iwch_create_cq() off-by-one error



The cxbg3 driver is unnecessarily decreasing the number of CQ entries by
one when creating a CQ.  This will cause the CQ not to have as many
entries as requested by the user if the user requests a power of 2 size.

Signed-off-by: default avatarJon Mason <jon@opengridcomputing.com>
Acked-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 1bab74e6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -189,7 +189,7 @@ static struct ib_cq *iwch_create_cq(struct ib_device *ibdev, int entries, int ve
		return ERR_PTR(-ENOMEM);
		return ERR_PTR(-ENOMEM);
	}
	}
	chp->rhp = rhp;
	chp->rhp = rhp;
	chp->ibcq.cqe = (1 << chp->cq.size_log2) - 1;
	chp->ibcq.cqe = 1 << chp->cq.size_log2;
	spin_lock_init(&chp->lock);
	spin_lock_init(&chp->lock);
	atomic_set(&chp->refcnt, 1);
	atomic_set(&chp->refcnt, 1);
	init_waitqueue_head(&chp->wait);
	init_waitqueue_head(&chp->wait);