Merge branch 'upstream/xen-settime' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / drivers / infiniband / hw / qib / qib_rc.c
index ecfa087..894afac 100644 (file)
@@ -271,13 +271,9 @@ int qib_make_rc_req(struct qib_qp *qp)
                        goto bail;
                }
                wqe = get_swqe_ptr(qp, qp->s_last);
-               while (qp->s_last != qp->s_acked) {
-                       qib_send_complete(qp, wqe, IB_WC_SUCCESS);
-                       if (++qp->s_last >= qp->s_size)
-                               qp->s_last = 0;
-                       wqe = get_swqe_ptr(qp, qp->s_last);
-               }
-               qib_send_complete(qp, wqe, IB_WC_WR_FLUSH_ERR);
+               qib_send_complete(qp, wqe, qp->s_last != qp->s_acked ?
+                       IB_WC_SUCCESS : IB_WC_WR_FLUSH_ERR);
+               /* will get called again */
                goto done;
        }
 
@@ -1889,10 +1885,8 @@ void qib_rc_rcv(struct qib_ctxtdata *rcd, struct qib_ib_header *hdr,
        }
 
        opcode = be32_to_cpu(ohdr->bth[0]);
-       spin_lock_irqsave(&qp->s_lock, flags);
        if (qib_ruc_check_hdr(ibp, hdr, has_grh, qp, opcode))
-               goto sunlock;
-       spin_unlock_irqrestore(&qp->s_lock, flags);
+               return;
 
        psn = be32_to_cpu(ohdr->bth[2]);
        opcode >>= 24;