Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91e9c071 authored by Vipul Pandya's avatar Vipul Pandya Committed by Roland Dreier
Browse files

RDMA/cxgb4: Abort connections when moving to ERROR state



If a FINI operation fails, then we need to ABORT instead of CLOSE.
Also, if we ABORT due to unexpected STREAMING data, then wake up
anybody blocked in FINI...

Signed-off-by: default avatarVipul Pandya <vipul@chelsio.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 55abf8df
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1438,6 +1438,7 @@ static int abort_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
	mutex_lock(&ep->com.mutex);
	mutex_lock(&ep->com.mutex);
	switch (ep->com.state) {
	switch (ep->com.state) {
	case ABORTING:
	case ABORTING:
		c4iw_wake_up(&ep->com.wr_wait, -ECONNRESET);
		__state_set(&ep->com, DEAD);
		__state_set(&ep->com, DEAD);
		release = 1;
		release = 1;
		break;
		break;
+1 −0
Original line number Original line Diff line number Diff line
@@ -1383,6 +1383,7 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp,
	qhp->ep = NULL;
	qhp->ep = NULL;
	set_state(qhp, C4IW_QP_STATE_ERROR);
	set_state(qhp, C4IW_QP_STATE_ERROR);
	free = 1;
	free = 1;
	abort = 1;
	wake_up(&qhp->wait);
	wake_up(&qhp->wait);
	BUG_ON(!ep);
	BUG_ON(!ep);
	flush_qp(qhp);
	flush_qp(qhp);