net/bnxt: fix ring group free
Added an invalid fw_grp_id check inside bnxt_hwrm_ring_grp_free(). This will prevent invalid fw_grp_id to be passed to the FW which can result in an error. This fixes the following failure in the "port stop" -> "port start" sequence: bnxt_hwrm_ring_grp_free(): error 2:0:00000000:0204 bnxt_hwrm_ring_grp_free(): error 2:0:00000000:0204 Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop") Cc: stable@dpdk.org Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Lance Richardson <lance.richardson@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
This commit is contained in:
parent
620e0290d1
commit
8269a4e8af
@ -1897,6 +1897,9 @@ int bnxt_hwrm_ring_grp_free(struct bnxt *bp, unsigned int idx)
|
||||
struct hwrm_ring_grp_free_input req = {.req_type = 0 };
|
||||
struct hwrm_ring_grp_free_output *resp = bp->hwrm_cmd_resp_addr;
|
||||
|
||||
if (bp->grp_info[idx].fw_grp_id == INVALID_HW_RING_ID)
|
||||
return 0;
|
||||
|
||||
HWRM_PREP(&req, HWRM_RING_GRP_FREE, BNXT_USE_CHIMP_MB);
|
||||
|
||||
req.ring_group_id = rte_cpu_to_le_16(bp->grp_info[idx].fw_grp_id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user