Skip to content

Commit 0f51763

Browse files
wenglianfaopsiff
authored andcommitted
RDMA/hns: Fix HW configurations not cleared in error flow
[ Upstream commit 998b41cb20b02c4e28ac558e4e7f8609d659ec05 ] 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: 7e78dd8 ("RDMA/hns: Clear extended doorbell info before using") Signed-off-by: wenglianfa <[email protected]> Signed-off-by: Junxian Huang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit 88d4191073a54b9573c985e19abad278a314268a)
1 parent a7b2b74 commit 0f51763

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/infiniband/hw/hns/hns_roce_hw_v2.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2986,7 +2986,7 @@ static int hns_roce_v2_init(struct hns_roce_dev *hr_dev)
29862986

29872987
ret = get_hem_table(hr_dev);
29882988
if (ret)
2989-
goto err_clear_extdb_failed;
2989+
goto err_get_hem_table_failed;
29902990

29912991
if (hr_dev->is_vf)
29922992
return 0;
@@ -3001,6 +3001,8 @@ static int hns_roce_v2_init(struct hns_roce_dev *hr_dev)
30013001

30023002
err_llm_init_failed:
30033003
put_hem_table(hr_dev);
3004+
err_get_hem_table_failed:
3005+
hns_roce_function_clear(hr_dev);
30043006
err_clear_extdb_failed:
30053007
if (hr_dev->pci_dev->revision == PCI_REVISION_ID_HIP08)
30063008
free_mr_exit(hr_dev);

0 commit comments

Comments
 (0)