diff mbox series

[net-next,1/3] net: hns3: remove a duplicate pf reset counting

Message ID 1618643364-64872-2-git-send-email-tanhuazhong@huawei.com
State New
Headers show
Series net: hns3: misc updates for -next | expand

Commit Message

Huazhong Tan April 17, 2021, 7:09 a.m. UTC
When enter suspend mode the counter of pf reset will be increased
twice, since both hclge_prepare_general() and hclge_prepare_wait()
increase this counter. So remove the duplicate counting in
hclge_prepare_general().

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index dc06986..c296ab6 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -11126,8 +11126,6 @@  static void hclge_reset_prepare_general(struct hnae3_ae_dev *ae_dev,
 
 	if (hdev->reset_type == HNAE3_FLR_RESET)
 		hdev->rst_stats.flr_rst_cnt++;
-	else if (hdev->reset_type == HNAE3_FUNC_RESET)
-		hdev->rst_stats.pf_rst_cnt++;
 }
 
 static void hclge_reset_done(struct hnae3_ae_dev *ae_dev)