summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuazhong Tan <tanhuazhong@huawei.com>2020-07-06 19:25:59 +0800
committerDavid S. Miller <davem@davemloft.net>2020-07-06 12:33:28 -0700
commitbb3d866882c280a85e8950d4d72af1e294d2e69c (patch)
tree918681ef717a22600660656f67d1866e170d0fc5
parent2294ca7a47d7094706450d641b243fa3a61843a3 (diff)
downloadlinux-bb3d866882c280a85e8950d4d72af1e294d2e69c.tar.bz2
net: hns3: check reset pending after FLR prepare
If there is a PF reset pending before FLR prepare, FLR's preparatory work will not fail, but the FLR rebuild procedure will fail for this pending. So this PF reset pending should be handled in the FLR preparatory. Fixes: 8627bdedc435 ("net: hns3: refactor the precedure of PF FLR") Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 96bfad52630d..d6bfdc6520df 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -9859,7 +9859,7 @@ retry:
set_bit(HCLGE_STATE_RST_HANDLING, &hdev->state);
hdev->reset_type = HNAE3_FLR_RESET;
ret = hclge_reset_prepare(hdev);
- if (ret) {
+ if (ret || hdev->reset_pending) {
dev_err(&hdev->pdev->dev, "fail to prepare FLR, ret=%d\n",
ret);
if (hdev->reset_pending ||