From: Kalesh AP Date: Thu, 6 Feb 2020 16:33:12 +0000 (+0530) Subject: net/bnxt: fix port stop on error recovery failure X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e5acec69294891c3bdd18c2a8177de74fb435c2d;p=dpdk.git net/bnxt: fix port stop on error recovery failure 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 --- diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 7147cc8fe2..3c40f4b599 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);