summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c
diff options
context:
space:
mode:
authorWeihang Li <liweihang@hisilicon.com>2019-06-20 11:52:41 +0300
committerDavid S. Miller <davem@davemloft.net>2019-06-26 18:59:02 +0300
commit9d5e67d1c191831da79f0a8bcff029151e3fe54b (patch)
tree3ad2446d4a7e9c37d5ab6848d41099aef47ad5b9 /drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c
parentb4b9bd92fe3f1ad147f3fe753b4fe4d7726ec741 (diff)
downloadlinux-9d5e67d1c191831da79f0a8bcff029151e3fe54b.tar.xz
net: hns3: remove override_pci_need_reset
We add override_pci_need_reset to prevent redundant and unwanted PF resets if a RAS error occurs in commit 69b51bbb03f7 ("net: hns3: fix to stop multiple HNS reset due to the AER changes"). Now in HNS3 driver, we use hw_err_reset_req to record reset level that we need to recover from a RAS error. This variable cans solve above issue as override_pci_need_reset, so this patch removes override_pci_need_reset. Signed-off-by: Weihang Li <liweihang@hisilicon.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c
index dd7b8a8c7771..3d8985f837e9 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c
@@ -1627,13 +1627,10 @@ pci_ers_result_t hclge_handle_hw_ras_error(struct hnae3_ae_dev *ae_dev)
if (test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state))
goto out;
- if (ae_dev->hw_err_reset_req) {
- ae_dev->override_pci_need_reset = 0;
+ if (ae_dev->hw_err_reset_req)
return PCI_ERS_RESULT_NEED_RESET;
- }
out:
- ae_dev->override_pci_need_reset = 1;
return PCI_ERS_RESULT_RECOVERED;
}