Commit c34c97ad authored by Jonathan Lallinger's avatar Jonathan Lallinger Committed by Roland Dreier

RDMA/cxgb4: Fix iw_cxgb4 count_rcqes() logic

Fix another place in the code where logic dealing with the t4_cqe was
using the wrong QID.  This fixes the counting logic so that it tests
against the SQ QID instead of the RQ QID when counting RCQES.

Signed-off by: Jonathan Lallinger <jonathan@ogc.us>
Signed-off by: Steve Wise <swise@ogc.us>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 1ea6b8f4
...@@ -311,7 +311,7 @@ void c4iw_count_rcqes(struct t4_cq *cq, struct t4_wq *wq, int *count) ...@@ -311,7 +311,7 @@ void c4iw_count_rcqes(struct t4_cq *cq, struct t4_wq *wq, int *count)
while (ptr != cq->sw_pidx) { while (ptr != cq->sw_pidx) {
cqe = &cq->sw_queue[ptr]; cqe = &cq->sw_queue[ptr];
if (RQ_TYPE(cqe) && (CQE_OPCODE(cqe) != FW_RI_READ_RESP) && if (RQ_TYPE(cqe) && (CQE_OPCODE(cqe) != FW_RI_READ_RESP) &&
(CQE_QPID(cqe) == wq->rq.qid) && cqe_completes_wr(cqe, wq)) (CQE_QPID(cqe) == wq->sq.qid) && cqe_completes_wr(cqe, wq))
(*count)++; (*count)++;
if (++ptr == cq->size) if (++ptr == cq->size)
ptr = 0; ptr = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment