]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
IB/mthca: fix WQE size calculation in create-srq
authorJack Morgenstein <jackm@mellanox.co.il>
Wed, 4 Jan 2006 22:42:39 +0000 (14:42 -0800)
committerRoland Dreier <rolandd@cisco.com>
Wed, 4 Jan 2006 22:42:39 +0000 (14:42 -0800)
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>
drivers/infiniband/hw/mthca/mthca_srq.c

index f7d234295efe3fa8c2fe0fa7eefa243f746391a0..e7e153d9c4c6d0f9b6c90d90ae301a0aa491ee10 100644 (file)
@@ -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);