[1/3] net/hns3: fix reset detect be ignored
Checks
Commit Message
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@dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
@@ -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");
}