From: Steve Wise <sw...@opengridcomputing.com>

Signed-off-by: Steve Wise <sw...@opengridcomputing.com>
Signed-off-by: Vipul Pandya <vi...@chelsio.com>
---
 drivers/infiniband/hw/cxgb4/qp.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index 22d1f01..5829367 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -1350,9 +1350,14 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp 
*qhp,
                        qhp->attr.ecode = attrs->ecode;
                        t4_set_wq_in_error(&qhp->wq);
                        ep = qhp->ep;
+                       disconnect = 1;
                        if (!internal)
                                terminate = 1;
-                       disconnect = 1;
+                       else {
+                               ret = rdma_fini(rhp, qhp, ep);
+                               if (ret)
+                                       goto err;
+                       }
                        c4iw_get_ep(&qhp->ep->com);
                        break;
                case C4IW_QP_STATE_ERROR:
-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to