[openib-general] [PATCH] ib_mthca: fix log size of srq for Arbel sent to hca at srq init time
Jack Morgenstein
jackm at dev.mellanox.co.il
Sat Nov 25 23:10:19 PST 2006
When initializing an mthca SRQ, the log_srq_size field should be the log of
the number of SRQ WQEs, not the log of the number of bytes in the SRQ.
This affects only mthca drivers for memfree HCAs which set the initial
srq wqe counter (in the SW2HW transition) to a non-zero value.
This fix should be queued for 2.6.20.
Signed-off-by: Jack Morgenstein <jackm at dev.mellanox.co.il>
Index: a/drivers/infiniband/hw/mthca/mthca_srq.c
===================================================================
--- a/drivers/infiniband/hw/mthca/mthca_srq.c
+++ b/drivers/infiniband/hw/mthca/mthca_srq.c
@@ -123,7 +123,7 @@ static void mthca_arbel_init_srq_context
memset(context, 0, sizeof *context);
- logsize = long_log2(srq->max) + srq->wqe_shift;
+ logsize = long_log2(srq->max);
context->state_logsize_srqn = cpu_to_be32(logsize << 24 | srq->srqn);
context->lkey = cpu_to_be32(srq->mr.ibmr.lkey);
context->db_index = cpu_to_be32(srq->db_index);
More information about the general
mailing list