diff options
author | Huazhong Tan <tanhuazhong@huawei.com> | 2019-04-06 10:43:32 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-09 01:30:49 +0300 |
commit | cf1f212916d9d59977aadd558a54aef6109bc2d1 (patch) | |
tree | c3a9fc2a0e3af29ac68a6081c9f9e29412a8798d /drivers/net | |
parent | 4f765d3e5213da43a5f410ea62445f9591bfa4dc (diff) | |
download | linux-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.c | 2 |
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; } |