From cf1f212916d9d59977aadd558a54aef6109bc2d1 Mon Sep 17 00:00:00 2001 From: Huazhong Tan Date: Sat, 6 Apr 2019 15:43:32 +0800 Subject: [PATCH] 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: 6a5f6fa382f3 ("net: hns3: add error handler for hclgevf_reset()") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: David S. Miller --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index 509ff93..0d9dd5e 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -1474,6 +1474,8 @@ err_reset: */ 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; } -- 2.7.4