From 90236089a26cfd1bd92eda63cb29c6ab05baa670 Mon Sep 17 00:00:00 2001 From: Dengdui Huang Date: Mon, 27 Nov 2023 21:39:02 +0800 Subject: [PATCH] net/hns3: fix reset event status [ upstream commit b59a0cbec866a8d4f7d1938b6826f7961c75c9fd ] The function hns3_clear_reset_event is used to clear PF reset status, The VF shouldn't use it. This patch fixes it. Fixes: 1eee1ea75c0e ("net/hns3: fix IMP or global reset") Signed-off-by: Dengdui Huang Acked-by: Jie Hai --- drivers/net/hns3/hns3_intr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c index a2c7a90e41..9c5a4b018c 100644 --- a/drivers/net/hns3/hns3_intr.c +++ b/drivers/net/hns3/hns3_intr.c @@ -2730,7 +2730,8 @@ hns3_reset_post(struct hns3_adapter *hns) /* IMP will wait ready flag before reset */ hns3_notify_reset_ready(hw, false); hns3_clear_reset_level(hw, &hw->reset.pending); - hns3_clear_reset_event(hw); + if (!hns->is_vf) + hns3_clear_reset_event(hw); __atomic_store_n(&hns->hw.reset.resetting, 0, __ATOMIC_RELAXED); hw->reset.attempts = 0; hw->reset.stats.success_cnt++;