From: Jack Morgenstein Date: Sun, 26 Nov 2006 07:10:19 +0000 (+0200) Subject: IB/mthca: Fix initial SRQ logsize for mem-free HCAs X-Git-Tag: MMI-PSA29.97-13-9~44978^2~47^2~572^2~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7013696a5f5ccd0d847d5e8b841d0b0b312277c8;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git IB/mthca: Fix initial SRQ logsize for mem-free HCAs 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. Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/mthca/mthca_srq.c b/drivers/infiniband/hw/mthca/mthca_srq.c index 58fcf5a691e4..34d2c4768962 100644 --- a/drivers/infiniband/hw/mthca/mthca_srq.c +++ b/drivers/infiniband/hw/mthca/mthca_srq.c @@ -120,7 +120,7 @@ static void mthca_arbel_init_srq_context(struct mthca_dev *dev, 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);