diff options
author | Steve Wise <swise@opengridcomputing.com> | 2014-03-19 13:14:38 +0100 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-03-20 17:59:04 +0100 |
commit | ffd435924c86de055d33fe59941841819eef9f6a (patch) | |
tree | 86b3fc2e3f95a7e77133d926c9eec3b026410416 /drivers/infiniband/hw/cxgb4/cq.c | |
parent | RDMA/cxgb4: Fix four byte info leak in c4iw_create_cq() (diff) | |
download | linux-ffd435924c86de055d33fe59941841819eef9f6a.tar.xz linux-ffd435924c86de055d33fe59941841819eef9f6a.zip |
RDMA/cxgb4: Cap CQ size at T4_MAX_IQ_SIZE
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/cq.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index e436ead0b32f..906119f7a43f 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c @@ -881,7 +881,7 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, int entries, /* * Make actual HW queue 2x to avoid cdix_inc overflows. */ - hwentries = entries * 2; + hwentries = min(entries * 2, T4_MAX_IQ_SIZE); /* * Make HW queue at least 64 entries so GTS updates aren't too |