Commit f55688c4 authored by Steve Wise's avatar Steve Wise Committed by Jason Gunthorpe

iw_cxgb4: Only validate the MSN for successful completions

If the RECV CQE is in error, ignore the MSN check.  This was causing
recvs that were flushed into the sw cq to be completed with the wrong
status (BAD_MSN instead of FLUSHED).

Cc: stable@vger.kernel.org
Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 9d98e19b
...@@ -571,10 +571,10 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe, ...@@ -571,10 +571,10 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe,
ret = -EAGAIN; ret = -EAGAIN;
goto skip_cqe; goto skip_cqe;
} }
if (unlikely((CQE_WRID_MSN(hw_cqe) != (wq->rq.msn)))) { if (unlikely(!CQE_STATUS(hw_cqe) &&
CQE_WRID_MSN(hw_cqe) != wq->rq.msn)) {
t4_set_wq_in_error(wq); t4_set_wq_in_error(wq);
hw_cqe->header |= htonl(CQE_STATUS_V(T4_ERR_MSN)); hw_cqe->header |= cpu_to_be32(CQE_STATUS_V(T4_ERR_MSN));
goto proc_cqe;
} }
goto proc_cqe; goto proc_cqe;
} }
......
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