compress/qat: enable compression on GEN3
[dpdk.git] / drivers / net / bnxt / bnxt_hwrm.c
index 6a70b6e..931ecea 100644 (file)
@@ -792,6 +792,9 @@ void bnxt_free_vf_info(struct bnxt *bp)
 {
        int i;
 
+       if (bp->pf == NULL)
+               return;
+
        if (bp->pf->vf_info == NULL)
                return;
 
@@ -1364,6 +1367,9 @@ int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags)
        HWRM_CHECK_RESULT();
        HWRM_UNLOCK();
 
+       PMD_DRV_LOG(DEBUG, "Port %u: Unregistered with fw\n",
+                   bp->eth_dev->data->port_id);
+
        return rc;
 }
 
@@ -1448,8 +1454,6 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
        HWRM_CHECK_RESULT();
        HWRM_UNLOCK();
 
-       PMD_DRV_LOG(DEBUG, "Port %u: Unregistered with fw\n",
-                   bp->eth_dev->data->port_id);
        return rc;
 }
 
@@ -1895,8 +1899,7 @@ int bnxt_hwrm_stat_clear(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)
        return rc;
 }
 
-int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
-                               unsigned int idx __rte_unused)
+static int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)
 {
        int rc;
        struct hwrm_stat_ctx_alloc_input req = {.req_type = 0 };
@@ -1919,8 +1922,7 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
        return rc;
 }
 
-int bnxt_hwrm_stat_ctx_free(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
-                               unsigned int idx __rte_unused)
+static int bnxt_hwrm_stat_ctx_free(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)
 {
        int rc;
        struct hwrm_stat_ctx_free_input req = {.req_type = 0 };
@@ -2590,7 +2592,7 @@ bnxt_free_all_hwrm_stat_ctxs(struct bnxt *bp)
                                bp->grp_info[i].fw_stats_ctx = -1;
                }
                if (cpr->hw_stats_ctx_id != HWRM_NA_SIGNATURE) {
-                       rc = bnxt_hwrm_stat_ctx_free(bp, cpr, i);
+                       rc = bnxt_hwrm_stat_ctx_free(bp, cpr);
                        cpr->hw_stats_ctx_id = HWRM_NA_SIGNATURE;
                        if (rc)
                                return rc;
@@ -2617,7 +2619,7 @@ int bnxt_alloc_all_hwrm_stat_ctxs(struct bnxt *bp)
                        cpr = rxq->cp_ring;
                }
 
-               rc = bnxt_hwrm_stat_ctx_alloc(bp, cpr, i);
+               rc = bnxt_hwrm_stat_ctx_alloc(bp, cpr);
 
                if (rc)
                        return rc;