[PATCH 1/3] net/hns3: fix reset detect be ignored
Dengdui Huang
huangdengdui at huawei.com
Mon Nov 27 14:39:01 CET 2023
The code logic that only new reset whose level is higher than old
reset level will be addressed is added in hns3_detect_reset_event,
see commit 5be38fc6c0fc ("net/hns3: fix multiple reset detected log").
When the new reset is detected and the old reset level is HNS3_NONE_RESET
this reset will be ignored. This patch fix it.
Fixes: 5be38fc6c0fc ("net/hns3: fix multiple reset detected log")
Cc: stable at dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 941d047bf1..ae81368f68 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5560,7 +5560,10 @@ hns3_detect_reset_event(struct hns3_hw *hw)
new_req = HNS3_GLOBAL_RESET;
}
- if (new_req != HNS3_NONE_RESET && last_req < new_req) {
+ if (new_req == HNS3_NONE_RESET)
+ return HNS3_NONE_RESET;
+
+ if (last_req == HNS3_NONE_RESET || last_req < new_req) {
hns3_schedule_delayed_reset(hns);
hns3_warn(hw, "High level reset detected, delay do reset");
}
--
2.33.0
More information about the dev
mailing list