[dpdk-dev] [PATCH 5/7] net/bnxt: fix to call port stop when error recovery fails

Kalesh A P kalesh-anakkur.purayil at broadcom.com
Thu Feb 6 17:33:12 CET 2020

From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>

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

Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Cc: stable at dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta at broadcom.com>
 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");
+	bnxt_dev_stop_op(bp->eth_dev);
 	bp->flags |= BNXT_FLAG_FATAL_ERROR;
 	bnxt_uninit_resources(bp, false);

More information about the dev mailing list