Skip to contentSkip to conversation

IW_CXGB4: Fix iw_cxgb4 count_rcqes logic

PATCH New Jonathan Lallinger 1 participant 1 message Oct 20, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IW_CXGB4: Fix iw_cxgb4 count_rcqes logic

Fixes another place in the code where logic dealing with the t4_cqe was using the wrong QID. This change 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-/Yg/[email protected]> Signed-off by: Steve Wise <swise-/Yg/[email protected]>
---

 drivers/infiniband/hw/cxgb4/cq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/infiniband/hw/cxgb4/cq.c +1 -1
index 901c5fb..04ae97e 100644
@@ -311,7 +311,7 @@ void c4iw_count_rcqes(struct t4_cq *cq, struct t4_wq *wq, int *count)
 	while (ptr != cq->sw_pidx) {
 		cqe = &cq->sw_queue[ptr];
 		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)++;
 		if (++ptr == cq->size)
 			ptr = 0;

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html