diff options
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/cq.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index 8d8f8add6fcd..1720dc790d13 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c | |||
@@ -801,6 +801,10 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, int entries, | |||
801 | if (ucontext) { | 801 | if (ucontext) { |
802 | memsize = roundup(memsize, PAGE_SIZE); | 802 | memsize = roundup(memsize, PAGE_SIZE); |
803 | hwentries = memsize / sizeof *chp->cq.queue; | 803 | hwentries = memsize / sizeof *chp->cq.queue; |
804 | while (hwentries > T4_MAX_IQ_SIZE) { | ||
805 | memsize -= PAGE_SIZE; | ||
806 | hwentries = memsize / sizeof *chp->cq.queue; | ||
807 | } | ||
804 | } | 808 | } |
805 | chp->cq.size = hwentries; | 809 | chp->cq.size = hwentries; |
806 | chp->cq.memsize = memsize; | 810 | chp->cq.memsize = memsize; |