diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2006-11-26 02:10:19 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-11-29 18:33:08 -0500 |
commit | 7013696a5f5ccd0d847d5e8b841d0b0b312277c8 (patch) | |
tree | a8d25a81d80f8d2087ee1fc4c7fca319231ae4b5 /drivers/infiniband/hw | |
parent | 2771e9ed4702e46c3f4c305eb2e047c251c2ad2b (diff) |
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 <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_srq.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
120 | 120 | ||
121 | memset(context, 0, sizeof *context); | 121 | memset(context, 0, sizeof *context); |
122 | 122 | ||
123 | logsize = long_log2(srq->max) + srq->wqe_shift; | 123 | logsize = long_log2(srq->max); |
124 | context->state_logsize_srqn = cpu_to_be32(logsize << 24 | srq->srqn); | 124 | context->state_logsize_srqn = cpu_to_be32(logsize << 24 | srq->srqn); |
125 | context->lkey = cpu_to_be32(srq->mr.ibmr.lkey); | 125 | context->lkey = cpu_to_be32(srq->mr.ibmr.lkey); |
126 | context->db_index = cpu_to_be32(srq->db_index); | 126 | context->db_index = cpu_to_be32(srq->db_index); |