]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/hw/mthca/mthca_qp.c
IB/mthca: Fix check of max_send_sge for special QPs
[linux-2.6-omap-h63xx.git] / drivers / infiniband / hw / mthca / mthca_qp.c
index 77b52b3adcc7fe6819f67c0a6e6d88ea802c1012..f5081bfde6db19641ce62cb3638139caebb6f880 100644 (file)
@@ -1249,10 +1249,10 @@ static int mthca_set_qp_size(struct mthca_dev *dev, struct ib_qp_cap *cap,
                return -EINVAL;
 
        /*
-        * For MLX transport we need 2 extra S/G entries:
+        * For MLX transport we need 2 extra send gather entries:
         * one for the header and one for the checksum at the end
         */
-       if (qp->transport == MLX && cap->max_recv_sge + 2 > dev->limits.max_sg)
+       if (qp->transport == MLX && cap->max_send_sge + 2 > dev->limits.max_sg)
                return -EINVAL;
 
        if (mthca_is_memfree(dev)) {