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 91AA5433E5; Mon, 27 Nov 2023 14:39:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36629406BA; Mon, 27 Nov 2023 14:39:08 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 18D28406B4 for ; Mon, 27 Nov 2023 14:39:06 +0100 (CET) Received: from dggpeml500011.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Sf65L2DBMzShTF; 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 2/3] net/hns3: fix VF wrong clear reset status Date: Mon, 27 Nov 2023 21:39:02 +0800 Message-ID: <20231127133903.1138657-3-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 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@dpdk.org Signed-off-by: Dengdui Huang --- 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