]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/hw/ipath/ipath_ruc.c
IB/ipath: NMI cpu lockup if local loopback used
[linux-2.6-omap-h63xx.git] / drivers / infiniband / hw / ipath / ipath_ruc.c
index e86cb171872e2c9ecc3d0c99e74d3f3a0ce3af93..cda84933bb4395b8c76e9c4c3bdbefcb30b6d80b 100644 (file)
@@ -202,6 +202,7 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only)
        wq->tail = tail;
 
        ret = 1;
+       qp->r_wrid_valid = 1;
        if (handler) {
                u32 n;
 
@@ -229,7 +230,6 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only)
                }
        }
        spin_unlock_irqrestore(&rq->lock, flags);
-       qp->r_wrid_valid = 1;
 
 bail:
        return ret;
@@ -265,7 +265,8 @@ static void ipath_ruc_loopback(struct ipath_qp *sqp)
 again:
        spin_lock_irqsave(&sqp->s_lock, flags);
 
-       if (!(ib_ipath_state_ops[sqp->state] & IPATH_PROCESS_SEND_OK)) {
+       if (!(ib_ipath_state_ops[sqp->state] & IPATH_PROCESS_SEND_OK) ||
+           qp->s_rnr_timeout) {
                spin_unlock_irqrestore(&sqp->s_lock, flags);
                goto done;
        }