summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorHuazhong Tan <tanhuazhong@huawei.com>2019-04-06 10:43:32 +0300
committerDavid S. Miller <davem@davemloft.net>2019-04-09 01:30:49 +0300
commitcf1f212916d9d59977aadd558a54aef6109bc2d1 (patch)
treec3a9fc2a0e3af29ac68a6081c9f9e29412a8798d /drivers/net
parent4f765d3e5213da43a5f410ea62445f9591bfa4dc (diff)
downloadlinux-cf1f212916d9d59977aadd558a54aef6109bc2d1.tar.xz
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 <tanhuazhong@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
index 509ff93f8cf5..0d9dd5e1e84c 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;
}