]> err.no Git - linux-2.6/blobdiff - drivers/infiniband/hw/cxgb3/cxio_hal.c
Merge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', 'omap...
[linux-2.6] / drivers / infiniband / hw / cxgb3 / cxio_hal.c
index ebf9d3043f80544dc32420b4483ef67111494ae9..3f441fc57c1719c6991d028dd5a0979760aa2d30 100644 (file)
@@ -405,11 +405,11 @@ int cxio_flush_sq(struct t3_wq *wq, struct t3_cq *cq, int count)
        struct t3_swsq *sqp = wq->sq + Q_PTR2IDX(wq->sq_rptr, wq->sq_size_log2);
 
        ptr = wq->sq_rptr + count;
-       sqp += count;
+       sqp = wq->sq + Q_PTR2IDX(ptr, wq->sq_size_log2);
        while (ptr != wq->sq_wptr) {
                insert_sq_cqe(wq, cq, sqp);
-               sqp++;
                ptr++;
+               sqp = wq->sq + Q_PTR2IDX(ptr, wq->sq_size_log2);
                flushed++;
        }
        return flushed;