summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@mellanox.co.il>2006-01-04 14:42:39 -0800
committerRoland Dreier <rolandd@cisco.com>2006-01-04 14:42:39 -0800
commit1d7d2f6f476cf7aa65f9f740a6c932fb75608110 (patch)
treed85f316160717bde054302d88e5007073ff82e4d /drivers/infiniband
parentc4342d8a4d95e18b957b898dbf5bfce28fca2780 (diff)
downloadop-kernel-dev-1d7d2f6f476cf7aa65f9f740a6c932fb75608110.zip
op-kernel-dev-1d7d2f6f476cf7aa65f9f740a6c932fb75608110.tar.gz
IB/mthca: fix WQE size calculation in create-srq
Thinko: 64 bytes is the minimum SRQ WQE size (not the maximum). Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_srq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_srq.c b/drivers/infiniband/hw/mthca/mthca_srq.c
index f7d2342..e7e153d 100644
--- a/drivers/infiniband/hw/mthca/mthca_srq.c
+++ b/drivers/infiniband/hw/mthca/mthca_srq.c
@@ -201,7 +201,7 @@ int mthca_alloc_srq(struct mthca_dev *dev, struct mthca_pd *pd,
if (mthca_is_memfree(dev))
srq->max = roundup_pow_of_two(srq->max + 1);
- ds = min(64UL,
+ ds = max(64UL,
roundup_pow_of_two(sizeof (struct mthca_next_seg) +
srq->max_gs * sizeof (struct mthca_data_seg)));
srq->wqe_shift = long_log2(ds);
OpenPOWER on IntegriCloud