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 29C0CA053B; Thu, 6 Feb 2020 17:17:12 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 27EE61C1E0; Thu, 6 Feb 2020 17:16:33 +0100 (CET) Received: from relay.smtp.broadcom.com (relay.smtp.broadcom.com [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id 99A451C1B0 for ; Thu, 6 Feb 2020 17:16:27 +0100 (CET) Received: from dhcp-10-123-153-22.dhcp.broadcom.net (bgccx-dev-host-lnx2.bec.broadcom.net [10.123.153.22]) by relay.smtp.broadcom.com (Postfix) with ESMTP id F0A3D1BDA98; Thu, 6 Feb 2020 08:16:25 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com F0A3D1BDA98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1581005787; bh=TmJXGmlaOwv/p97aLint+ZU9bYpylBqAktFvUZEZJ3E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S/6MnuQXlFoegyXFWAPc+AM4dvZJd5BFg/gtN+i6UtCSU1m9x8zTaMiAViX9T9PUB +IGW10cp7f1T/QDmSiv5v82SanW25rrzBAQMjUnqoNBfg1Ke0crvWz9219/1jBSHjG JJz+FEZvpzBm0cjgTl4AxnJ7e0+Xj0dvp24zrXvw= From: Kalesh A P To: dev@dpdk.org Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com Date: Thu, 6 Feb 2020 22:03:12 +0530 Message-Id: <20200206163314.12755-6-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20200206163314.12755-1-kalesh-anakkur.purayil@broadcom.com> References: <20200206163314.12755-1-kalesh-anakkur.purayil@broadcom.com> Subject: [dpdk-dev] [PATCH 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 7147cc8..3c40f4b 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.10.1