[05/11] net/bnxt: reset function earlier in initialization
diff mbox series

Message ID 20190602174247.32368-6-lance.richardson@broadcom.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • add support for BCM57508 controller
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Lance Richardson June 2, 2019, 5:42 p.m. UTC
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(-)

Patch
diff mbox series

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 30dff72a6..070262468 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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) {