mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-13 12:06:49 +00:00
RDMA/cxgb3: Move QP to error on destroy if the state is IDLE
Change iwch_destroy_qp() to always move the QP to ERROR and let iwch_modify_qp() decide what to do. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
42e3175354
commit
2df50da00e
1 changed files with 2 additions and 4 deletions
|
@ -738,10 +738,8 @@ static int iwch_destroy_qp(struct ib_qp *ib_qp)
|
||||||
qhp = to_iwch_qp(ib_qp);
|
qhp = to_iwch_qp(ib_qp);
|
||||||
rhp = qhp->rhp;
|
rhp = qhp->rhp;
|
||||||
|
|
||||||
if (qhp->attr.state == IWCH_QP_STATE_RTS) {
|
attrs.next_state = IWCH_QP_STATE_ERROR;
|
||||||
attrs.next_state = IWCH_QP_STATE_ERROR;
|
iwch_modify_qp(rhp, qhp, IWCH_QP_ATTR_NEXT_STATE, &attrs, 0);
|
||||||
iwch_modify_qp(rhp, qhp, IWCH_QP_ATTR_NEXT_STATE, &attrs, 0);
|
|
||||||
}
|
|
||||||
wait_event(qhp->wait, !qhp->ep);
|
wait_event(qhp->wait, !qhp->ep);
|
||||||
|
|
||||||
remove_handle(rhp, &rhp->qpidr, qhp->wq.qpid);
|
remove_handle(rhp, &rhp->qpidr, qhp->wq.qpid);
|
||||||
|
|
Loading…
Reference in a new issue