Commit b644a8d4 authored by Huazhong Tan's avatar Huazhong Tan Committed by David S. Miller

net: hns3: update some variables while hclge_reset()/hclgevf_reset() done

When hclge_reset() completes successfully, it should update the
last_reset_time, set reset_fail_cnt to 0, and set reset_type of
hnae3_ae_dev to HNAE3_NONE_RESET.

Also when hclgevf_reset() completes successfully, it should update
the last_reset_time, and set reset_type of hnae3_ae_dev to
HNAE3_NONE_RESET.
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 531eba0f
...@@ -2810,7 +2810,6 @@ static void hclge_reset(struct hclge_dev *hdev) ...@@ -2810,7 +2810,6 @@ static void hclge_reset(struct hclge_dev *hdev)
*/ */
ae_dev->reset_type = hdev->reset_type; ae_dev->reset_type = hdev->reset_type;
hdev->reset_count++; hdev->reset_count++;
hdev->last_reset_time = jiffies;
/* perform reset of the stack & ae device for a client */ /* perform reset of the stack & ae device for a client */
ret = hclge_notify_roce_client(hdev, HNAE3_DOWN_CLIENT); ret = hclge_notify_roce_client(hdev, HNAE3_DOWN_CLIENT);
if (ret) if (ret)
...@@ -2873,6 +2872,10 @@ static void hclge_reset(struct hclge_dev *hdev) ...@@ -2873,6 +2872,10 @@ static void hclge_reset(struct hclge_dev *hdev)
if (ret) if (ret)
goto err_reset; goto err_reset;
hdev->last_reset_time = jiffies;
hdev->reset_fail_cnt = 0;
ae_dev->reset_type = HNAE3_NONE_RESET;
return; return;
err_reset_lock: err_reset_lock:
......
...@@ -1342,6 +1342,9 @@ static int hclgevf_reset(struct hclgevf_dev *hdev) ...@@ -1342,6 +1342,9 @@ static int hclgevf_reset(struct hclgevf_dev *hdev)
rtnl_unlock(); rtnl_unlock();
hdev->last_reset_time = jiffies;
ae_dev->reset_type = HNAE3_NONE_RESET;
return ret; return ret;
err_reset_lock: err_reset_lock:
rtnl_unlock(); rtnl_unlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment