RDMA/cxgb3: Wrap the software send queue pointer as needed on flush

cxio_flush_sq() was failing to wrap around the software send queue
causing garbage completion entries on a flush operation.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

authored by Steve Wise and committed by Roland Dreier a58e58fa f018c7e1

+2 -2
+2 -2
drivers/infiniband/hw/cxgb3/cxio_hal.c
··· 405 405 struct t3_swsq *sqp = wq->sq + Q_PTR2IDX(wq->sq_rptr, wq->sq_size_log2); 406 406 407 407 ptr = wq->sq_rptr + count; 408 - sqp += count; 408 + sqp = wq->sq + Q_PTR2IDX(ptr, wq->sq_size_log2); 409 409 while (ptr != wq->sq_wptr) { 410 410 insert_sq_cqe(wq, cq, sqp); 411 - sqp++; 412 411 ptr++; 412 + sqp = wq->sq + Q_PTR2IDX(ptr, wq->sq_size_log2); 413 413 flushed++; 414 414 } 415 415 return flushed;