Skip to content

Commit

Permalink
net/hns3: fix ignored reset event
Browse files Browse the repository at this point in the history
[ upstream commit 4c40006c4b6b3c567185c84d60535752c9f7ea3d ]

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()',
in fixed commit.

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")

Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Jie Hai <haijie1@huawei.com>
  • Loading branch information
huangdengdui1 authored and kevintraynor committed Dec 5, 2023
1 parent f2151f9 commit 0dece28
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/hns3/hns3_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -5612,7 +5612,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");
}
Expand Down

0 comments on commit 0dece28

Please sign in to comment.