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

net: hns3: handle pending reset while reset fail

The ongoing lower-level reset will fail when there is a higher-level
reset occurs, so the error handler should deal with this situation.

Fixes: 6a5f6fa3 ("net: hns3: add error handler for hclgevf_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 4f765d3e
...@@ -1474,6 +1474,8 @@ static int hclgevf_reset(struct hclgevf_dev *hdev) ...@@ -1474,6 +1474,8 @@ static int hclgevf_reset(struct hclgevf_dev *hdev)
*/ */
hclgevf_cmd_init(hdev); hclgevf_cmd_init(hdev);
dev_err(&hdev->pdev->dev, "failed to reset VF\n"); dev_err(&hdev->pdev->dev, "failed to reset VF\n");
if (hclgevf_is_reset_pending(hdev))
hclgevf_reset_task_schedule(hdev);
return ret; return ret;
} }
......
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