From: Mike Marciniszyn Date: Tue, 11 Jan 2011 01:42:20 +0000 (-0800) Subject: IB/qib: Clear WAIT_SEND flags when setting QP to error state X-Git-Tag: upstream/snapshot3+hdmi~12071^2^7~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=16028f27778cb6439516c36c0a72446d29805691;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git IB/qib: Clear WAIT_SEND flags when setting QP to error state If these flags are set when the QP is transitioned to the error state, it will wait until the flags are cleared, which may never happen if the error transition is due to a link going down. Signed-off-by: Mike Marciniszyn Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/qib/qib_qp.c b/drivers/infiniband/hw/qib/qib_qp.c index 6c39851..32dacd4 100644 --- a/drivers/infiniband/hw/qib/qib_qp.c +++ b/drivers/infiniband/hw/qib/qib_qp.c @@ -468,6 +468,10 @@ int qib_error_qp(struct qib_qp *qp, enum ib_wc_status err) qp->s_flags &= ~(QIB_S_TIMER | QIB_S_WAIT_RNR); del_timer(&qp->s_timer); } + + if (qp->s_flags & QIB_S_ANY_WAIT_SEND) + qp->s_flags &= ~QIB_S_ANY_WAIT_SEND; + spin_lock(&dev->pending_lock); if (!list_empty(&qp->iowait) && !(qp->s_flags & QIB_S_BUSY)) { qp->s_flags &= ~QIB_S_ANY_WAIT_IO;