src/dpdk/drivers/net/bnxt/bnxt_ethdev.c
static int bnxt_get_config(struct bnxt *bp)
{
	uint16_t mtu;
	int rc = 0;

	bp->fw_cap = 0;

	rc = bnxt_map_hcomm_fw_status_reg(bp);
	if (rc)
		return rc;

	rc = bnxt_hwrm_ver_get(bp, DFLT_HWRM_CMD_TIMEOUT);
	if (rc) {
		bnxt_check_fw_status(bp);
		return rc;
	}

	rc = bnxt_hwrm_func_reset(bp);
	if (rc)
		return -EIO;

	rc = bnxt_hwrm_vnic_qcaps(bp);
	if (rc)
		return rc;

	rc = bnxt_hwrm_queue_qportcfg(bp);
	if (rc)
		return rc;

	/* Get the MAX capabilities for this function.
	 * This function also allocates context memory for TQM rings and
	 * informs the firmware about this allocated backing store memory.
	 */
	rc = bnxt_hwrm_func_qcaps(bp);
	if (rc)
		return rc;

	rc = bnxt_hwrm_func_qcfg(bp, &mtu);
	if (rc)
		return rc;

	rc = bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(bp);
	if (rc)
		return rc;

	bnxt_hwrm_port_mac_qcfg(bp);

	bnxt_hwrm_parent_pf_qcfg(bp);

	bnxt_hwrm_port_phy_qcaps(bp);

	bnxt_alloc_error_recovery_info(bp);
	/* Get the adapter error recovery support info */
	rc = bnxt_hwrm_error_recovery_qcfg(bp);
	if (rc)
		bp->fw_cap &= ~BNXT_FW_CAP_ERROR_RECOVERY;

	bnxt_hwrm_port_led_qcaps(bp);

	return 0;
}
/* This function gets the FW version along with the
 * capabilities(MAX and current) of the function, vnic,
 * error recovery, phy and other chip related info
 */
This function gets the FW version along with the
capabilities(MAX and current) of the function, vnic,
error recovery, phy and other chip related info
This function gets the FW version along with the capabilities ( MAX and current ) of the function vnic error recovery phy and other chip related info
static int bnxt_get_config(struct bnxt *bp)
{
	uint16_t mtu;
	int rc = 0;
	bp->fw_cap = 0;
	rc = bnxt_map_hcomm_fw_status_reg(bp);
	if (rc)
		return rc;
	rc = bnxt_hwrm_ver_get(bp, DFLT_HWRM_CMD_TIMEOUT);
	if (rc) {
		bnxt_check_fw_status(bp);
		return rc;
	}
	rc = bnxt_hwrm_func_reset(bp);
	if (rc)
		return -EIO;
	rc = bnxt_hwrm_vnic_qcaps(bp);
	if (rc)
		return rc;
	rc = bnxt_hwrm_queue_qportcfg(bp);
	if (rc)
		return rc;
	rc = bnxt_hwrm_func_qcaps(bp);
	if (rc)
		return rc;
	rc = bnxt_hwrm_func_qcfg(bp, &mtu);
	if (rc)
		return rc;
	rc = bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(bp);
	if (rc)
		return rc;
	bnxt_hwrm_port_mac_qcfg(bp);
	bnxt_hwrm_parent_pf_qcfg(bp);
	bnxt_hwrm_port_phy_qcaps(bp);
	bnxt_alloc_error_recovery_info(bp);
	rc = bnxt_hwrm_error_recovery_qcfg(bp);
	if (rc)
		bp->fw_cap &= ~BNXT_FW_CAP_ERROR_RECOVERY;
	bnxt_hwrm_port_led_qcaps(bp);
	return 0;
}
static int bnxt_get_config ( struct bnxt * bp ) { uint16_t mtu ; int rc = 0 ; bp -> fw_cap = 0 ; rc = bnxt_map_hcomm_fw_status_reg ( bp ) ; if ( rc ) return rc ; rc = bnxt_hwrm_ver_get ( bp , DFLT_HWRM_CMD_TIMEOUT ) ; if ( rc ) { bnxt_check_fw_status ( bp ) ; return rc ; } rc = bnxt_hwrm_func_reset ( bp ) ; if ( rc ) return - EIO ; rc = bnxt_hwrm_vnic_qcaps ( bp ) ; if ( rc ) return rc ; rc = bnxt_hwrm_queue_qportcfg ( bp ) ; if ( rc ) return rc ; rc = bnxt_hwrm_func_qcaps ( bp ) ; if ( rc ) return rc ; rc = bnxt_hwrm_func_qcfg ( bp , & mtu ) ; if ( rc ) return rc ; rc = bnxt_hwrm_cfa_adv_flow_mgmt_qcaps ( bp ) ; if ( rc ) return rc ; bnxt_hwrm_port_mac_qcfg ( bp ) ; bnxt_hwrm_parent_pf_qcfg ( bp ) ; bnxt_hwrm_port_phy_qcaps ( bp ) ; bnxt_alloc_error_recovery_info ( bp ) ; rc = bnxt_hwrm_error_recovery_qcfg ( bp ) ; if ( rc ) bp -> fw_cap &= ~ BNXT_FW_CAP_ERROR_RECOVERY ; bnxt_hwrm_port_led_qcaps ( bp ) ; return 0 ; }
This function gets the FW version along with the
 capabilities(MAX and current) of the function, vnic,
 error recovery, phy and other chip related info
This function gets the FW version along with the capabilities ( MAX and current ) of the function vnic error recovery phy and other chip related info
/* Get the MAX capabilities for this function.
	 * This function also allocates context memory for TQM rings and
	 * informs the firmware about this allocated backing store memory.
	 */ /* Get the adapter error recovery support info */