[5/9] net/bnxt: fix to handle port start failure
Checks
Commit Message
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Fixed to invoke clean up in the reverse sequence of
initialization in case any of the FW commands fail
during port start.
Fixes: 0b533591238f ("net/bnxt: inform firmware about IF state changes")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -1113,10 +1113,10 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
return 0;
error:
- bnxt_hwrm_if_change(bp, false);
bnxt_shutdown_nic(bp);
bnxt_free_tx_mbufs(bp);
bnxt_free_rx_mbufs(bp);
+ bnxt_hwrm_if_change(bp, false);
eth_dev->data->dev_started = 0;
return rc;
}