i40iw: Update hw_iwarp_state
authorMustafa Ismail <mustafa.ismail@intel.com>
Thu, 25 Aug 2016 16:52:47 +0000 (11:52 -0500)
committerDoug Ledford <dledford@redhat.com>
Fri, 26 Aug 2016 13:59:13 +0000 (09:59 -0400)
Update iwqp->hw_iwarp_state to reflect the new state of the CQP
modify QP operation. This avoids reissuing a CQP operation to
modify a QP to a state that it is already in.

Fixes: 4e9042e647ff ("i40iw: add hw and utils files")
Reported-by: Stefan Assmann <sassmann@redhat.com>
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/i40iw/i40iw_hw.c

index 3ee0cad96bc688457475a1f727969e7f05336e62..0c92a40b3e8699f6d14c24bc51b0ac98e3e8ad45 100644 (file)
@@ -265,6 +265,7 @@ void i40iw_next_iw_state(struct i40iw_qp *iwqp,
                info.dont_send_fin = false;
        if (iwqp->sc_qp.term_flags && (state == I40IW_QP_STATE_ERROR))
                info.reset_tcp_conn = true;
+       iwqp->hw_iwarp_state = state;
        i40iw_hw_modify_qp(iwqp->iwdev, iwqp, &info, 0);
 }