RDMA/cxgb4: Issue RI.FINI before closing when entering TERM
authorSteve Wise <swise@opengridcomputing.com>
Tue, 6 Aug 2013 15:34:40 +0000 (21:04 +0530)
committerRoland Dreier <roland@purestorage.com>
Tue, 13 Aug 2013 18:55:49 +0000 (11:55 -0700)
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb4/qp.c

index 22d1f01..5829367 100644 (file)
@@ -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: