[PATCH 2/3] net/hns3: fix VF wrong clear reset status
Dengdui Huang
huangdengdui at huawei.com
Mon Nov 27 14:39:02 CET 2023
The function hns3_clear_reset_event is used to clear PF
reset status, The VF shouldn't use it.
This patch fix it.
Fixes: 1eee1ea75c0e ("net/hns3: fix IMP or global reset")
Cc: stable at dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
---
drivers/net/hns3/hns3_intr.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index c5a3e3797c..52b5435a23 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -2749,7 +2749,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++;
@@ -2799,7 +2800,8 @@ hns3_reset_fail_handle(struct hns3_adapter *hns)
struct timeval tv;
hns3_clear_reset_level(hw, &hw->reset.pending);
- hns3_clear_reset_event(hw);
+ if (!hns->is_vf)
+ hns3_clear_reset_event(hw);
if (hns3_reset_err_handle(hns)) {
hw->reset.stage = RESET_STAGE_PREWAIT;
hns3_schedule_reset(hns);
--
2.33.0
More information about the dev
mailing list