From eb7df97472da30eae26c2afe5d0c06bba6aea8ac Mon Sep 17 00:00:00 2001 From: Steve Wise Date: Thu, 20 May 2010 16:57:38 -0500 Subject: [PATCH] --- yaml --- r: 198420 b: refs/heads/master c: 895cf5f3d6cb72825919a39ae48a41476a821e65 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/infiniband/hw/cxgb4/cq.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index b41e5928c656..13eaf790944f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1c01c5388306a4c2245b71da0cba22d521e897ae +refs/heads/master: 895cf5f3d6cb72825919a39ae48a41476a821e65 diff --git a/trunk/drivers/infiniband/hw/cxgb4/cq.c b/trunk/drivers/infiniband/hw/cxgb4/cq.c index fb1aafcc294f..46ac00f728f3 100644 --- a/trunk/drivers/infiniband/hw/cxgb4/cq.c +++ b/trunk/drivers/infiniband/hw/cxgb4/cq.c @@ -780,6 +780,9 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, int entries, /* account for the status page. */ entries++; + /* IQ needs one extra entry to differentiate full vs empty. */ + entries++; + /* * entries must be multiple of 16 for HW. */ @@ -801,7 +804,7 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, int entries, chp->rhp = rhp; chp->cq.size--; /* status page */ - chp->ibcq.cqe = chp->cq.size; + chp->ibcq.cqe = chp->cq.size - 1; spin_lock_init(&chp->lock); atomic_set(&chp->refcnt, 1); init_waitqueue_head(&chp->wait);