diff options
author | Wenpeng Liang <liangwenpeng@huawei.com> | 2022-08-29 12:50:19 +0200 |
---|---|---|
committer | Leon Romanovsky <leonro@nvidia.com> | 2022-08-30 09:22:35 +0200 |
commit | 0c8b5d6268d92d141bfd64d21c870d295a84dee1 (patch) | |
tree | b472120ac5f3db0ad1aba8b0dc250c09a1363a8d /drivers/infiniband/hw/hns | |
parent | RDMA/hns: Fix supported page size (diff) | |
download | linux-0c8b5d6268d92d141bfd64d21c870d295a84dee1.tar.xz linux-0c8b5d6268d92d141bfd64d21c870d295a84dee1.zip |
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: cfc85f3e4b7f ("RDMA/hns: Add profile support for hip08 driver")
Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC")
Link: https://lore.kernel.org/r/20220829105021.1427804-3-liangwenpeng@huawei.com
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/hns')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_qp.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c index 48d3616a6d71..7bee7f6c5e70 100644 --- a/drivers/infiniband/hw/hns/hns_roce_qp.c +++ b/drivers/infiniband/hw/hns/hns_roce_qp.c @@ -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 && |