From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8E284A0541; Thu, 6 Feb 2020 19:45:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 87A741C20A; Thu, 6 Feb 2020 19:44:48 +0100 (CET) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 412F31C1C7; Thu, 6 Feb 2020 19:44:39 +0100 (CET) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id B917630C114; Thu, 6 Feb 2020 10:37:16 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com B917630C114 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1581014236; bh=VGRNYEp0XdbQD+uHRN2tu3G8neHjAa6W/N9RV0b+Y9M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NBFNMnXVArRpiMRE9+nqRcump+nPTbk3pOc8O9SuFs5gYHOAIy4x1xLCT0H4lso6+ rzI6XeAXeLGuytwqcTmU0EGqJpFUJ6gRX6yuZOIzlSvasEtVK2CTPEiKENcveWvlN3 FnJhUSl/JQbOfsiAvMU4os6YmQor2FyadGG17oqk= Received: from C02VPB22HTD6.wifi.broadcom.net (c02vpb22htd6.wifi.broadcom.net [10.69.74.102]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 3C19414008B; Thu, 6 Feb 2020 10:44:36 -0800 (PST) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Kalesh AP , stable@dpdk.org, Somnath Kotur , Rahul Gupta Date: Thu, 6 Feb 2020 10:44:30 -0800 Message-Id: <20200206184432.34360-6-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20200206184432.34360-1-ajit.khaparde@broadcom.com> References: <20200206163314.12755-1-kalesh-anakkur.purayil@broadcom.com> <20200206184432.34360-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 5/7] net/bnxt: fix to call port stop when error recovery fails X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kalesh AP During live FW upgrade or error recovery, if restoring the filter settings fail after port start, driver invokes bnxt_uninit_resources() only. Fix it to invoke bnxt_dev_stop_op() first before calling bnxt_uninit_resources(). Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Rahul Gupta --- drivers/net/bnxt/bnxt_ethdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 7147cc8fe..3c40f4b59 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -4022,15 +4022,17 @@ static void bnxt_dev_recover(void *arg) rc = bnxt_dev_start_op(bp->eth_dev); if (rc) { PMD_DRV_LOG(ERR, "Failed to start port after reset\n"); - goto err; + goto err_start; } rc = bnxt_restore_filters(bp); if (rc) - goto err; + goto err_start; PMD_DRV_LOG(INFO, "Recovered from FW reset\n"); return; +err_start: + bnxt_dev_stop_op(bp->eth_dev); err: bp->flags |= BNXT_FLAG_FATAL_ERROR; bnxt_uninit_resources(bp, false); -- 2.21.1 (Apple Git-122.3)