Skip to content

Commit ced0776

Browse files
Yixian Liujgunthorpe
authored andcommitted
RDMA/hns: Fix QP state judgement before receiving work requests
The QP can accept receive work requests only when the QP is in the states that allow them to be submitted. This patch updates the QP state judgement based on the specification. Signed-off-by: Yixian Liu <liuyixian@huawei.com> Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1 parent 173bc6b commit ced0776

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/infiniband/hw/hns/hns_roce_hw_v2.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ static int hns_roce_v2_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr,
509509
spin_lock_irqsave(&hr_qp->rq.lock, flags);
510510
ind = hr_qp->rq.head & (hr_qp->rq.wqe_cnt - 1);
511511

512-
if (hr_qp->state == IB_QPS_RESET || hr_qp->state == IB_QPS_ERR) {
512+
if (hr_qp->state == IB_QPS_RESET) {
513513
spin_unlock_irqrestore(&hr_qp->rq.lock, flags);
514514
*bad_wr = wr;
515515
return -EINVAL;

0 commit comments

Comments
 (0)