RDMA/cxgb4: Wake up waiters after flushing the qp
authorSteve Wise <swise@opengridcomputing.com>
Fri, 21 Nov 2014 15:36:36 +0000 (09:36 -0600)
committerRoland Dreier <roland@purestorage.com>
Tue, 16 Dec 2014 02:10:46 +0000 (18:10 -0800)
When transitioning into ERROR state, the QP was getting flushed after
waking up any waiters.  This can cause applications to miss flushed work
requests which can stall an NFS mount.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb4/qp.c

index 2ed3ece2b2ee38de0bf38525914ffb85cb7ed80d..bb85d479e66eec254fa5c389e9dc4cc335248bb4 100644 (file)
@@ -1538,9 +1538,9 @@ err:
        set_state(qhp, C4IW_QP_STATE_ERROR);
        free = 1;
        abort = 1;
-       wake_up(&qhp->wait);
        BUG_ON(!ep);
        flush_qp(qhp);
+       wake_up(&qhp->wait);
 out:
        mutex_unlock(&qhp->mutex);