Commit b82db240 authored by Huazhong Tan's avatar Huazhong Tan Committed by Zheng Zengkai
Browse files

net: hns3: remove a duplicate pf reset counting

mainline inclusion
from mainline-v5.13-rc1
commit 1c5a2ba6
category: bugfix
bugzilla: 173966
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1c5a2ba67989c01b8aeda81969b7a4a3702c51b5



----------------------------------------------------------------------

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: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Reviewed-by: default avatarYongxin Li <liyongxin1@huawei.com>
Signed-off-by: default avatarJunxin Chen <chenjunxin1@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent a3402141
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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)