aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2013-08-06 11:34:38 -0400
committerRoland Dreier <roland@purestorage.com>2013-08-13 14:55:47 -0400
commitb298881fcf52b04f073d64e4c584ac050506d7b9 (patch)
tree6f808e3798630bfafe80b49eb5226e97d9470aca
parentb38a0ad8ec1129bc2fdadc3baed45ff70d5726e2 (diff)
RDMA/cxgb4: Always do GTS write if cidx_inc == CIDXINC_MASK
When polling, we do a GTS update if the accumulated cidx_inc == the CQ depth / 16. However, if the CQ is large enough, Cq depth / 16 exceeds the size of the field in the GTS word. So we also need to update if cidx_inc hits CIDXINC_MASK to avoid overflowing the field. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Vipul Pandya <vipul@chelsio.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r--drivers/infiniband/hw/cxgb4/t4.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/t4.h b/drivers/infiniband/hw/cxgb4/t4.h
index 3a6a289b9d3e..1272dfe056f5 100644
--- a/drivers/infiniband/hw/cxgb4/t4.h
+++ b/drivers/infiniband/hw/cxgb4/t4.h
@@ -531,7 +531,7 @@ static inline void t4_swcq_consume(struct t4_cq *cq)
531static inline void t4_hwcq_consume(struct t4_cq *cq) 531static inline void t4_hwcq_consume(struct t4_cq *cq)
532{ 532{
533 cq->bits_type_ts = cq->queue[cq->cidx].bits_type_ts; 533 cq->bits_type_ts = cq->queue[cq->cidx].bits_type_ts;
534 if (++cq->cidx_inc == (cq->size >> 4)) { 534 if (++cq->cidx_inc == (cq->size >> 4) || cq->cidx_inc == CIDXINC_MASK) {
535 u32 val; 535 u32 val;
536 536
537 val = SEINTARM(0) | CIDXINC(cq->cidx_inc) | TIMERREG(7) | 537 val = SEINTARM(0) | CIDXINC(cq->cidx_inc) | TIMERREG(7) |