[05/11] net/bnxt: reset function earlier in initialization
Checks
Commit Message
Move function reset to beginnng of initialization sequence.
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
@@ -3484,6 +3484,14 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
rc = bnxt_hwrm_ver_get(bp);
if (rc)
goto error_free;
+
+ rc = bnxt_hwrm_func_reset(bp);
+ if (rc) {
+ PMD_DRV_LOG(ERR, "hwrm chip reset failure rc: %x\n", rc);
+ rc = -EIO;
+ goto error_free;
+ }
+
rc = bnxt_hwrm_queue_qportcfg(bp);
if (rc) {
PMD_DRV_LOG(ERR, "hwrm queue qportcfg failed\n");
@@ -3584,12 +3592,6 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
pci_dev->mem_resource[0].phys_addr,
pci_dev->mem_resource[0].addr);
- rc = bnxt_hwrm_func_reset(bp);
- if (rc) {
- PMD_DRV_LOG(ERR, "hwrm chip reset failure rc: %x\n", rc);
- rc = -EIO;
- goto error_free;
- }
if (BNXT_PF(bp)) {
//if (bp->pf.active_vfs) {