diff options
author | Steve Wise <swise@opengridcomputing.com> | 2017-12-18 13:10:00 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-02 20:35:07 +0100 |
commit | 72d5e020c0ef77ba86f2a5ff37620b65ba7d5daf (patch) | |
tree | fba5bd7bbe7c98705837488212492a564f555995 /drivers | |
parent | 2e0d458c315ab2bee425212725aae841e0f6dd6a (diff) | |
download | linux-stable-72d5e020c0ef77ba86f2a5ff37620b65ba7d5daf.tar.gz linux-stable-72d5e020c0ef77ba86f2a5ff37620b65ba7d5daf.tar.bz2 linux-stable-72d5e020c0ef77ba86f2a5ff37620b65ba7d5daf.zip |
iw_cxgb4: Only validate the MSN for successful completions
commit f55688c45442bc863f40ad678c638785b26cdce6 upstream.
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).
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cq.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index 19c6477af19f..a856371bbe58 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c @@ -575,10 +575,10 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe, ret = -EAGAIN; 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); - hw_cqe->header |= htonl(CQE_STATUS_V(T4_ERR_MSN)); - goto proc_cqe; + hw_cqe->header |= cpu_to_be32(CQE_STATUS_V(T4_ERR_MSN)); } goto proc_cqe; } |