net/bnxt: reset function earlier in initialization
authorLance Richardson <lance.richardson@broadcom.com>
Sun, 2 Jun 2019 17:42:40 +0000 (13:42 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 13 Jun 2019 14:54:29 +0000 (23:54 +0900)
Move function reset to beginnng of initialization sequence.

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c

index 61ae799..72679be 100644 (file)
@@ -3484,6 +3484,14 @@ skip_ext_stats:
        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 @@ skip_ext_stats:
                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) {