瀏覽代碼

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>
Jack Morgenstein 18 年之前
父節點
當前提交
7013696a5f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/infiniband/hw/mthca/mthca_srq.c

+ 1 - 1
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);
 	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->state_logsize_srqn = cpu_to_be32(logsize << 24 | srq->srqn);
 	context->lkey = cpu_to_be32(srq->mr.ibmr.lkey);
 	context->lkey = cpu_to_be32(srq->mr.ibmr.lkey);
 	context->db_index = cpu_to_be32(srq->db_index);
 	context->db_index = cpu_to_be32(srq->db_index);