diff options
author | Yixing Liu <liuyixing1@huawei.com> | 2022-08-29 18:50:20 +0800 |
---|---|---|
committer | Leon Romanovsky <leonro@nvidia.com> | 2022-08-30 10:22:43 +0300 |
commit | 45baad7dd98f4d83f67c86c28769d3184390e324 (patch) | |
tree | a32ad72e875ec8fc1e095b347b3d75b7c2e64a7a /drivers/infiniband/hw/hns/hns_roce_main.c | |
parent | 0c8b5d6268d92d141bfd64d21c870d295a84dee1 (diff) | |
download | linux-45baad7dd98f4d83f67c86c28769d3184390e324.tar.gz linux-45baad7dd98f4d83f67c86c28769d3184390e324.tar.bz2 linux-45baad7dd98f4d83f67c86c28769d3184390e324.zip |
RDMA/hns: Remove the num_qpc_timer variable
The bt number of qpc_timer of HIP09 increases compared with that of HIP08.
Therefore, qpc_timer_bt_num and num_qpc_timer do not match. As a result,
the driver may fail to allocate qpc_timer. So the driver needs to uniquely
uses qpc_timer_bt_num to represent the bt number of qpc_timer.
Fixes: 0e40dc2f70cd ("RDMA/hns: Add timer allocation support for hip08")
Link: https://lore.kernel.org/r/20220829105021.1427804-4-liangwenpeng@huawei.com
Signed-off-by: Yixing Liu <liuyixing1@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/hns_roce_main.c')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c index c8af4ebd7cbd..4ccb217b2841 100644 --- a/drivers/infiniband/hw/hns/hns_roce_main.c +++ b/drivers/infiniband/hw/hns/hns_roce_main.c @@ -725,7 +725,7 @@ static int hns_roce_init_hem(struct hns_roce_dev *hr_dev) ret = hns_roce_init_hem_table(hr_dev, &hr_dev->qpc_timer_table, HEM_TYPE_QPC_TIMER, hr_dev->caps.qpc_timer_entry_sz, - hr_dev->caps.num_qpc_timer, 1); + hr_dev->caps.qpc_timer_bt_num, 1); if (ret) { dev_err(dev, "Failed to init QPC timer memory, aborting.\n"); |