mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 13:06:59 +02:00
RDMA/hns: Fix HW configurations not cleared in error flow
hns_roce_clear_extdb_list_info() will eventually do some HW
configurations through FW, and they need to be cleared by
calling hns_roce_function_clear() when the initialization
fails.
Fixes: 7e78dd816e ("RDMA/hns: Clear extended doorbell info before using")
Signed-off-by: wenglianfa <wenglianfa@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://patch.msgid.link/20250703113905.3597124-3-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
c6957b95ec
commit
998b41cb20
|
|
@ -3001,7 +3001,7 @@ static int hns_roce_v2_init(struct hns_roce_dev *hr_dev)
|
|||
|
||||
ret = get_hem_table(hr_dev);
|
||||
if (ret)
|
||||
goto err_clear_extdb_failed;
|
||||
goto err_get_hem_table_failed;
|
||||
|
||||
if (hr_dev->is_vf)
|
||||
return 0;
|
||||
|
|
@ -3016,6 +3016,8 @@ static int hns_roce_v2_init(struct hns_roce_dev *hr_dev)
|
|||
|
||||
err_llm_init_failed:
|
||||
put_hem_table(hr_dev);
|
||||
err_get_hem_table_failed:
|
||||
hns_roce_function_clear(hr_dev);
|
||||
err_clear_extdb_failed:
|
||||
if (hr_dev->pci_dev->revision == PCI_REVISION_ID_HIP08)
|
||||
free_mr_exit(hr_dev);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user