RDMA/cxgb4: Abort connections when moving to ERROR state
authorVipul Pandya <vipul@chelsio.com>
Mon, 7 Jan 2013 13:11:51 +0000 (13:11 +0000)
committerRoland Dreier <roland@purestorage.com>
Thu, 14 Feb 2013 23:51:55 +0000 (15:51 -0800)
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>
drivers/infiniband/hw/cxgb4/cm.c
drivers/infiniband/hw/cxgb4/qp.c

index 9cab6a6..3dce47a 100644 (file)
@@ -1438,6 +1438,7 @@ static int abort_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
        mutex_lock(&ep->com.mutex);
        switch (ep->com.state) {
        case ABORTING:
+               c4iw_wake_up(&ep->com.wr_wait, -ECONNRESET);
                __state_set(&ep->com, DEAD);
                release = 1;
                break;
index 05bfe53..17ba4f8 100644 (file)
@@ -1383,6 +1383,7 @@ err:
        qhp->ep = NULL;
        set_state(qhp, C4IW_QP_STATE_ERROR);
        free = 1;
+       abort = 1;
        wake_up(&qhp->wait);
        BUG_ON(!ep);
        flush_qp(qhp);