Skip to content

Commit 0c8b5d6

Browse files
Wenpeng Liangrleon
authored andcommitted
RDMA/hns: Fix wrong fixed value of qp->rq.wqe_shift
The value of qp->rq.wqe_shift of HIP08 is always determined by the number of sge. So delete the wrong branch. Fixes: cfc85f3 ("RDMA/hns: Add profile support for hip08 driver") Fixes: 926a01d ("RDMA/hns: Add QP operations support for hip08 SoC") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Wenpeng Liang <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 55af9d4 commit 0c8b5d6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/infiniband/hw/hns/hns_roce_qp.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -462,11 +462,8 @@ static int set_rq_size(struct hns_roce_dev *hr_dev, struct ib_qp_cap *cap,
462462
hr_qp->rq.max_gs = roundup_pow_of_two(max(1U, cap->max_recv_sge) +
463463
hr_qp->rq.rsv_sge);
464464

465-
if (hr_dev->caps.max_rq_sg <= HNS_ROCE_SGE_IN_WQE)
466-
hr_qp->rq.wqe_shift = ilog2(hr_dev->caps.max_rq_desc_sz);
467-
else
468-
hr_qp->rq.wqe_shift = ilog2(hr_dev->caps.max_rq_desc_sz *
469-
hr_qp->rq.max_gs);
465+
hr_qp->rq.wqe_shift = ilog2(hr_dev->caps.max_rq_desc_sz *
466+
hr_qp->rq.max_gs);
470467

471468
hr_qp->rq.wqe_cnt = cnt;
472469
if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_RQ_INLINE &&

0 commit comments

Comments
 (0)