History

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.

Yixian Liu committed 8 years ago

Commit ced07761 parent 173bc6b1 file · +1 −1Browse files

Unified · Split

drivers/infiniband/hw/hns/hns_roce_hw_v2.c+1−1
@@ -509,7 +509,7 @@ static int hns_roce_v2_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr, · 508 unmodified lines
509 spin_lock_irqsave(&hr_qp->rq.lock, flags);509 spin_lock_irqsave(&hr_qp->rq.lock, flags);
510 ind = hr_qp->rq.head & (hr_qp->rq.wqe_cnt - 1);510 ind = hr_qp->rq.head & (hr_qp->rq.wqe_cnt - 1);
511 511
512 if (hr_qp->state == IB_QPS_RESET || hr_qp->state == IB_QPS_ERR) {512 if (hr_qp->state == IB_QPS_RESET) {
513 spin_unlock_irqrestore(&hr_qp->rq.lock, flags);513 spin_unlock_irqrestore(&hr_qp->rq.lock, flags);
514 *bad_wr = wr;514 *bad_wr = wr;
515 return -EINVAL;515 return -EINVAL;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t