OSDN Git Service

net: hns3: remove a duplicate pf reset counting
authorHuazhong Tan <tanhuazhong@huawei.com>
Sat, 17 Apr 2021 07:09:22 +0000 (15:09 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Apr 2021 22:38:05 +0000 (15:38 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index dc06986..c296ab6 100644 (file)
@@ -11126,8 +11126,6 @@ retry:
 
        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)