diff options
author | Parav Pandit <parav.pandit@emulex.com> | 2012-08-17 10:45:33 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-09-14 13:40:58 -0400 |
commit | ae3bca90e94dbc9c906321b33f32de4a42a6cdf4 (patch) | |
tree | 1672ab676b578f2e1551daa42f2318c249ca7d6c /drivers/infiniband | |
parent | fea7a08acb13524b47711625eebea40a0ede69a0 (diff) |
RDMA/ocrdma: Fix CQE expansion of unsignaled WQE
Fix CQE expansion of unsignaled WQE -- don't expand the CQE when the
WQE index of the completed CQE matches with last pending WQE (tail) in
the queue.
Signed-off-by: Parav Pandit <parav.pandit@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index cb5b7f7d4d38..b29a4246ef41 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | |||
@@ -2219,7 +2219,6 @@ static bool ocrdma_poll_success_scqe(struct ocrdma_qp *qp, | |||
2219 | u32 wqe_idx; | 2219 | u32 wqe_idx; |
2220 | 2220 | ||
2221 | if (!qp->wqe_wr_id_tbl[tail].signaled) { | 2221 | if (!qp->wqe_wr_id_tbl[tail].signaled) { |
2222 | expand = true; /* CQE cannot be consumed yet */ | ||
2223 | *polled = false; /* WC cannot be consumed yet */ | 2222 | *polled = false; /* WC cannot be consumed yet */ |
2224 | } else { | 2223 | } else { |
2225 | ibwc->status = IB_WC_SUCCESS; | 2224 | ibwc->status = IB_WC_SUCCESS; |
@@ -2227,10 +2226,11 @@ static bool ocrdma_poll_success_scqe(struct ocrdma_qp *qp, | |||
2227 | ibwc->qp = &qp->ibqp; | 2226 | ibwc->qp = &qp->ibqp; |
2228 | ocrdma_update_wc(qp, ibwc, tail); | 2227 | ocrdma_update_wc(qp, ibwc, tail); |
2229 | *polled = true; | 2228 | *polled = true; |
2230 | wqe_idx = le32_to_cpu(cqe->wq.wqeidx) & OCRDMA_CQE_WQEIDX_MASK; | ||
2231 | if (tail != wqe_idx) | ||
2232 | expand = true; /* Coalesced CQE can't be consumed yet */ | ||
2233 | } | 2229 | } |
2230 | wqe_idx = le32_to_cpu(cqe->wq.wqeidx) & OCRDMA_CQE_WQEIDX_MASK; | ||
2231 | if (tail != wqe_idx) | ||
2232 | expand = true; /* Coalesced CQE can't be consumed yet */ | ||
2233 | |||
2234 | ocrdma_hwq_inc_tail(&qp->sq); | 2234 | ocrdma_hwq_inc_tail(&qp->sq); |
2235 | return expand; | 2235 | return expand; |
2236 | } | 2236 | } |