RDMA/bnxt_re: Set QP state in case of response completion errors
authorSelvin Xavier <selvin.xavier@broadcom.com>
Mon, 6 Nov 2017 16:07:30 +0000 (08:07 -0800)
committerDoug Ledford <dledford@redhat.com>
Mon, 13 Nov 2017 20:53:57 +0000 (15:53 -0500)
Moves the driver QP state to error in case of response completion
errors. Handles the scenarios which doesn't generate a terminal CQE.

Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/bnxt_re/qplib_fp.c

index 31ea9f43f7d308f71338b12a925841912d09e243..805a6124a48cf9b263d589bc5b3a79941a855834 100644 (file)
@@ -2118,6 +2118,7 @@ static int bnxt_qplib_cq_process_res_rc(struct bnxt_qplib_cq *cq,
        *pcqe = cqe;
 
        if (hwcqe->status != CQ_RES_RC_STATUS_OK) {
+               qp->state = CMDQ_MODIFY_QP_NEW_STATE_ERR;
                 /* Add qp to flush list of the CQ */
                bnxt_qplib_lock_buddy_cq(qp, cq);
                __bnxt_qplib_add_flush_qp(qp);
@@ -2181,6 +2182,7 @@ static int bnxt_qplib_cq_process_res_ud(struct bnxt_qplib_cq *cq,
        *pcqe = cqe;
 
        if (hwcqe->status != CQ_RES_RC_STATUS_OK) {
+               qp->state = CMDQ_MODIFY_QP_NEW_STATE_ERR;
                /* Add qp to flush list of the CQ */
                bnxt_qplib_lock_buddy_cq(qp, cq);
                __bnxt_qplib_add_flush_qp(qp);
@@ -2268,6 +2270,7 @@ static int bnxt_qplib_cq_process_res_raweth_qp1(struct bnxt_qplib_cq *cq,
        *pcqe = cqe;
 
        if (hwcqe->status != CQ_RES_RC_STATUS_OK) {
+               qp->state = CMDQ_MODIFY_QP_NEW_STATE_ERR;
                /* Add qp to flush list of the CQ */
                bnxt_qplib_lock_buddy_cq(qp, cq);
                __bnxt_qplib_add_flush_qp(qp);