net/ice: fix build when Rx descriptor size is 16
[dpdk.git] / drivers / net / bnxt / bnxt_hwrm.c
index d4d8581..181e607 100644 (file)
@@ -2741,6 +2741,14 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
        if (BNXT_HAS_RING_GRPS(bp))
                bp->grp_info[queue_index].rx_fw_ring_id = INVALID_HW_RING_ID;
 
+       /* Check agg ring struct explicitly.
+        * bnxt_need_agg_ring() returns the current state of offload flags,
+        * but we may have to deal with agg ring struct before the offload
+        * flags are updated.
+        */
+       if (!bnxt_need_agg_ring(bp->eth_dev) || rxr->ag_ring_struct == NULL)
+               goto no_agg;
+
        ring = rxr->ag_ring_struct;
        bnxt_hwrm_ring_free(bp, ring,
                            BNXT_CHIP_P5(bp) ?
@@ -2750,6 +2758,7 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
        if (BNXT_HAS_RING_GRPS(bp))
                bp->grp_info[queue_index].ag_fw_ring_id = INVALID_HW_RING_ID;
 
+no_agg:
        bnxt_hwrm_stat_ctx_free(bp, cpr);
 
        bnxt_free_cp_ring(bp, cpr);
@@ -5716,11 +5725,11 @@ int bnxt_hwrm_error_recovery_qcfg(struct bnxt *bp)
        /* FW returned values are in units of 100msec */
        info->driver_polling_freq =
                rte_le_to_cpu_32(resp->driver_polling_freq) * 100;
-       info->master_func_wait_period =
+       info->primary_func_wait_period =
                rte_le_to_cpu_32(resp->master_func_wait_period) * 100;
        info->normal_func_wait_period =
                rte_le_to_cpu_32(resp->normal_func_wait_period) * 100;
-       info->master_func_wait_period_after_reset =
+       info->primary_func_wait_period_after_reset =
                rte_le_to_cpu_32(resp->master_func_wait_period_after_reset) * 100;
        info->max_bailout_time_after_reset =
                rte_le_to_cpu_32(resp->max_bailout_time_after_reset) * 100;