netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ofa-general] [PATCH 2.6.26] RDMA/cxgb3: Wrap the software sq ptr as needed on flush.
@ 2008-05-09 20:19 Steve Wise
  2008-05-13 18:53 ` Roland Dreier
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Wise @ 2008-05-09 20:19 UTC (permalink / raw)
  To: rdreier; +Cc: netdev, linux-kernel, general


cxio_flush_sq() was failing to wrap around the sw-sq causing garbage
completion entries on a flush operation.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
---

 drivers/infiniband/hw/cxgb3/cxio_hal.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.c b/drivers/infiniband/hw/cxgb3/cxio_hal.c
index 5fd8506..20a6326 100644
--- a/drivers/infiniband/hw/cxgb3/cxio_hal.c
+++ b/drivers/infiniband/hw/cxgb3/cxio_hal.c
@@ -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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [ofa-general] [PATCH 2.6.26] RDMA/cxgb3: Wrap the software sq ptr as needed on flush.
  2008-05-09 20:19 [ofa-general] [PATCH 2.6.26] RDMA/cxgb3: Wrap the software sq ptr as needed on flush Steve Wise
@ 2008-05-13 18:53 ` Roland Dreier
  0 siblings, 0 replies; 2+ messages in thread
From: Roland Dreier @ 2008-05-13 18:53 UTC (permalink / raw)
  To: Steve Wise; +Cc: netdev, linux-kernel, general

thanks, applied

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-13 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-09 20:19 [ofa-general] [PATCH 2.6.26] RDMA/cxgb3: Wrap the software sq ptr as needed on flush Steve Wise
2008-05-13 18:53 ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).