Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
[linux-2.6-microblaze.git] / drivers / infiniband / hw / hns / hns_roce_srq.c
index 0cceae0..7113ebf 100644 (file)
@@ -380,7 +380,7 @@ int hns_roce_create_srq(struct ib_srq *ib_srq,
        srq->wqe_cnt = roundup_pow_of_two(init_attr->attr.max_wr + 1);
        srq->max_gs = init_attr->attr.max_sge;
 
-       srq_desc_size = max(16, 16 * srq->max_gs);
+       srq_desc_size = roundup_pow_of_two(max(16, 16 * srq->max_gs));
 
        srq->wqe_shift = ilog2(srq_desc_size);