aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_srq.c
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/hw/mthca/mthca_srq.c
parentIB/mthca: Fix corner cases in max_rd_atomic value handling in modify QP (diff)
downloadlinux-dev-1d7d2f6f476cf7aa65f9f740a6c932fb75608110.tar.xz
linux-dev-1d7d2f6f476cf7aa65f9f740a6c932fb75608110.zip
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/hw/mthca/mthca_srq.c')
-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 f7d234295efe..e7e153d9c4c6 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);