From: Huazhong Tan tanhuazhong@huawei.com
driver inclusion category: bugfix bugzilla: NA CVE: NA
When calling hclge_reset_rebuild(), it means the hardware reset has already been done, so this patch updates hw_reset_done_cnt at the beginning of hclge_reset_rebuild().
Fixes: ab90cbea0164 ("net: hns3: split hclge_reset() into preparing and rebuilding part")
Signed-off-by: Huazhong Tan tanhuazhong@huawei.com Reviewed-by: Yunsheng Lin linyunsheng@huawei.com Reviewed-by: Zhong Zhaohui zhongzhaohui@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index b9f4441..46607c8 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -3730,6 +3730,8 @@ static int hclge_reset_rebuild(struct hclge_dev *hdev) enum hnae3_reset_type reset_level; int ret;
+ hdev->rst_stats.hw_reset_done_cnt++; + ret = hclge_notify_roce_client(hdev, HNAE3_UNINIT_CLIENT); if (ret) return ret; @@ -3791,8 +3793,6 @@ static void hclge_reset(struct hclge_dev *hdev) if (hclge_reset_wait(hdev)) goto err_reset;
- hdev->rst_stats.hw_reset_done_cnt++; - if (hclge_reset_rebuild(hdev)) goto err_reset;