aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb4
diff options
context:
space:
mode:
authorVipul Pandya <vipul@chelsio.com>2013-01-07 08:11:51 -0500
committerRoland Dreier <roland@purestorage.com>2013-02-14 18:51:55 -0500
commit91e9c07195032bbde47489b8b423053cff5f413d (patch)
tree9d19031aa034f0589caede82ae2203f5a6a233cf /drivers/infiniband/hw/cxgb4
parent55abf8df0aa080eb474f7f46337503351890b361 (diff)
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: Vipul Pandya <vipul@chelsio.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4')
-rw-r--r--drivers/infiniband/hw/cxgb4/cm.c1
-rw-r--r--drivers/infiniband/hw/cxgb4/qp.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 9cab6a6eb96a..3dce47a63709 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -1438,6 +1438,7 @@ static int abort_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
1438 mutex_lock(&ep->com.mutex); 1438 mutex_lock(&ep->com.mutex);
1439 switch (ep->com.state) { 1439 switch (ep->com.state) {
1440 case ABORTING: 1440 case ABORTING:
1441 c4iw_wake_up(&ep->com.wr_wait, -ECONNRESET);
1441 __state_set(&ep->com, DEAD); 1442 __state_set(&ep->com, DEAD);
1442 release = 1; 1443 release = 1;
1443 break; 1444 break;
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index 05bfe53bff64..17ba4f8bc12d 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -1383,6 +1383,7 @@ err:
1383 qhp->ep = NULL; 1383 qhp->ep = NULL;
1384 set_state(qhp, C4IW_QP_STATE_ERROR); 1384 set_state(qhp, C4IW_QP_STATE_ERROR);
1385 free = 1; 1385 free = 1;
1386 abort = 1;
1386 wake_up(&qhp->wait); 1387 wake_up(&qhp->wait);
1387 BUG_ON(!ep); 1388 BUG_ON(!ep);
1388 flush_qp(qhp); 1389 flush_qp(qhp);