Skip to content

Commit d2c3337

Browse files
bharatpotnurijgunthorpe
authored andcommitted
RDMA/iw_cxgb4: Always disconnect when QP is transitioning to TERMINATE state
On receiving a TERM from tje peer, Host moves the QP to TERMINATE state and then moves the adapter out of RDMA mode. After issuing a TERM, peer issues a CLOSE and at this point of time if the connectivity between peer and host is lost for a significant amount of time, the QP remains in TERMINATE state. Therefore c4iw_modify_qp() needs to initiate a close on entering terminate state. Signed-off-by: Potnuri Bharat Teja <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 0f51427 commit d2c3337

File tree

1 file changed

+2
-2
lines changed
  • drivers/infiniband/hw/cxgb4

1 file changed

+2
-2
lines changed

drivers/infiniband/hw/cxgb4/qp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1976,10 +1976,10 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp,
19761976
qhp->attr.layer_etype = attrs->layer_etype;
19771977
qhp->attr.ecode = attrs->ecode;
19781978
ep = qhp->ep;
1979+
c4iw_get_ep(&ep->com);
1980+
disconnect = 1;
19791981
if (!internal) {
1980-
c4iw_get_ep(&qhp->ep->com);
19811982
terminate = 1;
1982-
disconnect = 1;
19831983
} else {
19841984
terminate = qhp->attr.send_term;
19851985
ret = rdma_fini(rhp, qhp, ep);

0 commit comments

Comments
 (0)