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: 8627bdedc4 ("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>
This commit is contained in:
Huazhong Tan 2020-07-06 19:25:59 +08:00 committed by David S. Miller
parent 2294ca7a47
commit bb3d866882
1 changed files with 1 additions and 1 deletions

View File

@ -9859,7 +9859,7 @@ retry:
set_bit(HCLGE_STATE_RST_HANDLING, &hdev->state); set_bit(HCLGE_STATE_RST_HANDLING, &hdev->state);
hdev->reset_type = HNAE3_FLR_RESET; hdev->reset_type = HNAE3_FLR_RESET;
ret = hclge_reset_prepare(hdev); ret = hclge_reset_prepare(hdev);
if (ret) { if (ret || hdev->reset_pending) {
dev_err(&hdev->pdev->dev, "fail to prepare FLR, ret=%d\n", dev_err(&hdev->pdev->dev, "fail to prepare FLR, ret=%d\n",
ret); ret);
if (hdev->reset_pending || if (hdev->reset_pending ||