Skip to content

Commit

Permalink
net: hns3: handle pending reset while reset fail
Browse files Browse the repository at this point in the history
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: 6a5f6fa ("net: hns3: add error handler for hclgevf_reset()")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Huazhong Tan authored and David S. Miller committed Apr 8, 2019
1 parent 4f765d3 commit cf1f212
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1474,6 +1474,8 @@ static int hclgevf_reset(struct hclgevf_dev *hdev)
*/
hclgevf_cmd_init(hdev);
dev_err(&hdev->pdev->dev, "failed to reset VF\n");
if (hclgevf_is_reset_pending(hdev))
hclgevf_reset_task_schedule(hdev);

return ret;
}
Expand Down

0 comments on commit cf1f212

Please sign in to comment.