RDMA/hns: Fix wrong fixed value of qp->rq.wqe_shift
[linux-2.6-microblaze.git] / drivers / infiniband / hw / hns / hns_roce_qp.c
index 48d3616..7bee7f6 100644 (file)
@@ -462,11 +462,8 @@ static int set_rq_size(struct hns_roce_dev *hr_dev, struct ib_qp_cap *cap,
        hr_qp->rq.max_gs = roundup_pow_of_two(max(1U, cap->max_recv_sge) +
                                              hr_qp->rq.rsv_sge);
 
-       if (hr_dev->caps.max_rq_sg <= HNS_ROCE_SGE_IN_WQE)
-               hr_qp->rq.wqe_shift = ilog2(hr_dev->caps.max_rq_desc_sz);
-       else
-               hr_qp->rq.wqe_shift = ilog2(hr_dev->caps.max_rq_desc_sz *
-                                           hr_qp->rq.max_gs);
+       hr_qp->rq.wqe_shift = ilog2(hr_dev->caps.max_rq_desc_sz *
+                                   hr_qp->rq.max_gs);
 
        hr_qp->rq.wqe_cnt = cnt;
        if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_RQ_INLINE &&