]> git.hungrycats.org Git - linux/commitdiff
IB/rxe: Update qp state for user query
authorYonatan Cohen <yonatanc@mellanox.com>
Wed, 16 Nov 2016 08:39:18 +0000 (10:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Nov 2016 08:56:57 +0000 (09:56 +0100)
commit 6d931308f55faaef3f30bd0346c47f99528b229d upstream.

The method rxe_qp_error() transitions QP to error state
and make sure the QP is drained. It did not though update
the QP state for user's query.

This patch fixes this.

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Yonatan Cohen <yonatanc@mellanox.com>
Reviewed-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/sw/rxe/rxe_qp.c

index 22ba24f2a2c18b165623be787c00e0c9637f25fd..b9d5e7965706304d97dbdd4ada4bdfaf0d055fde 100644 (file)
@@ -573,6 +573,7 @@ void rxe_qp_error(struct rxe_qp *qp)
 {
        qp->req.state = QP_STATE_ERROR;
        qp->resp.state = QP_STATE_ERROR;
+       qp->attr.qp_state = IB_QPS_ERR;
 
        /* drain work and packet queues */
        rxe_run_task(&qp->resp.task, 1);