Configure QP's max message size according to the value queried
by query dev cap. 

Signed-off-by: Eli Cohen <[EMAIL PROTECTED]>

---

Please note the two previous patches were numbered 6. "fix typo" is 6
and "s/g" is 7.

Index: linux-2.6.23-rc1/drivers/infiniband/hw/mlx4/qp.c
===================================================================
--- linux-2.6.23-rc1.orig/drivers/infiniband/hw/mlx4/qp.c       2007-08-15 
20:50:30.000000000 +0300
+++ linux-2.6.23-rc1/drivers/infiniband/hw/mlx4/qp.c    2007-08-15 
20:50:34.000000000 +0300
@@ -746,7 +746,8 @@ static int __mlx4_ib_modify_qp(struct ib
                               attr->path_mtu);
                        goto out;
                }
-               context->mtu_msgmax = (attr->path_mtu << 5) | 31;
+               context->mtu_msgmax = (attr->path_mtu << 5) |
+                       ilog2(dev->dev->caps.max_msg_sz);
        }
 
        if (qp->rq.wqe_cnt)

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to