From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 95A21433E5; Mon, 27 Nov 2023 14:39:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 779A740A75; Mon, 27 Nov 2023 14:39:10 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 3C7824014F for ; Mon, 27 Nov 2023 14:39:06 +0100 (CET) Received: from dggpeml500011.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Sf65L14WMzShSY; Mon, 27 Nov 2023 21:34:46 +0800 (CST) Received: from localhost.huawei.com (10.50.165.33) by dggpeml500011.china.huawei.com (7.185.36.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 27 Nov 2023 21:39:04 +0800 From: Dengdui Huang To: CC: , , , , , Subject: [PATCH 1/3] net/hns3: fix reset detect be ignored Date: Mon, 27 Nov 2023 21:39:01 +0800 Message-ID: <20231127133903.1138657-2-huangdengdui@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20231127133903.1138657-1-huangdengdui@huawei.com> References: <20231127133903.1138657-1-huangdengdui@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.50.165.33] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500011.china.huawei.com (7.185.36.84) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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