]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/hw/mthca/mthca_srq.c
IB/mthca: Fix check of size in SRQ creation
[linux-2.6-omap-h63xx.git] / drivers / infiniband / hw / mthca / mthca_srq.c
index 0cfd158022179e23804b7c6b0d8a691e495c8d38..e74751ef913cca5eebcfc955c9f3da9c242d796c 100644 (file)
@@ -206,7 +206,7 @@ int mthca_alloc_srq(struct mthca_dev *dev, struct mthca_pd *pd,
                 roundup_pow_of_two(sizeof (struct mthca_next_seg) +
                                    srq->max_gs * sizeof (struct mthca_data_seg)));
 
-       if (ds > dev->limits.max_desc_sz)
+       if (!mthca_is_memfree(dev) && (ds > dev->limits.max_desc_sz))
                return -EINVAL;
 
        srq->wqe_shift = long_log2(ds);