diff options
author | Jack Morgenstein <jackm@mellanox.co.il> | 2006-01-04 14:42:39 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-01-04 14:42:39 -0800 |
commit | 1d7d2f6f476cf7aa65f9f740a6c932fb75608110 (patch) | |
tree | d85f316160717bde054302d88e5007073ff82e4d /drivers/infiniband/hw/mthca | |
parent | c4342d8a4d95e18b957b898dbf5bfce28fca2780 (diff) | |
download | op-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/hw/mthca')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_srq.c | 2 |
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); |