diff options
author | Jon Mason <jon@opengridcomputing.com> | 2008-03-09 16:54:12 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-03-09 16:54:12 -0400 |
commit | 4fa45725df0f00c2bf86a0fc2670e88bfe0ceee7 (patch) | |
tree | 37a7cf4f16bcc9ca36ebee018fea015b7110a334 /drivers/infiniband | |
parent | 1bab74e691d3c7845df2342d202c0f1c2344c834 (diff) |
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: Jon Mason <jon@opengridcomputing.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index ee3d63cd1f96..b2ea9210467f 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c | |||
@@ -189,7 +189,7 @@ static struct ib_cq *iwch_create_cq(struct ib_device *ibdev, int entries, int ve | |||
189 | return ERR_PTR(-ENOMEM); | 189 | return ERR_PTR(-ENOMEM); |
190 | } | 190 | } |
191 | chp->rhp = rhp; | 191 | chp->rhp = rhp; |
192 | chp->ibcq.cqe = (1 << chp->cq.size_log2) - 1; | 192 | chp->ibcq.cqe = 1 << chp->cq.size_log2; |
193 | spin_lock_init(&chp->lock); | 193 | spin_lock_init(&chp->lock); |
194 | atomic_set(&chp->refcnt, 1); | 194 | atomic_set(&chp->refcnt, 1); |
195 | init_waitqueue_head(&chp->wait); | 195 | init_waitqueue_head(&chp->wait); |