src/dpdk/drivers/net/cxgbe/base/t4vf_hw.c
int t4vf_get_dev_params(struct adapter *adapter)
{
	u32 params[7], vals[7];
	int v;

	params[0] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) |
		     V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_FWREV));
	params[1] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) |
		     V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_TPREV));
	v = t4vf_query_params(adapter, 2, params, vals);
	if (v != FW_SUCCESS)
		return v;
	adapter->params.fw_vers = vals[0];
	adapter->params.tp_vers = vals[1];

	dev_info(adapter, "Firmware version: %u.%u.%u.%u\n",
		 G_FW_HDR_FW_VER_MAJOR(adapter->params.fw_vers),
		 G_FW_HDR_FW_VER_MINOR(adapter->params.fw_vers),
		 G_FW_HDR_FW_VER_MICRO(adapter->params.fw_vers),
		 G_FW_HDR_FW_VER_BUILD(adapter->params.fw_vers));

	dev_info(adapter, "TP Microcode version: %u.%u.%u.%u\n",
		 G_FW_HDR_FW_VER_MAJOR(adapter->params.tp_vers),
		 G_FW_HDR_FW_VER_MINOR(adapter->params.tp_vers),
		 G_FW_HDR_FW_VER_MICRO(adapter->params.tp_vers),
		 G_FW_HDR_FW_VER_BUILD(adapter->params.tp_vers));
	return 0;
}
/**
 * t4vf_get_dev_params - retrieve device paremeters
 * @adapter: the adapter
 *
 * Retrives fw and tp version.
 */
retrieve device paremeters
@adapter: the adapter

Retrives fw and tp version.
retrieve device paremeters @adapter : the adapter Retrives fw and tp version .
int t4vf_get_dev_params(struct adapter *adapter)
{
	u32 params[7], vals[7];
	int v;
	params[0] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) |
		     V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_FWREV));
	params[1] = (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) |
		     V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_TPREV));
	v = t4vf_query_params(adapter, 2, params, vals);
	if (v != FW_SUCCESS)
		return v;
	adapter->params.fw_vers = vals[0];
	adapter->params.tp_vers = vals[1];
	dev_info(adapter, "Firmware version: %u.%u.%u.%u\n",
		 G_FW_HDR_FW_VER_MAJOR(adapter->params.fw_vers),
		 G_FW_HDR_FW_VER_MINOR(adapter->params.fw_vers),
		 G_FW_HDR_FW_VER_MICRO(adapter->params.fw_vers),
		 G_FW_HDR_FW_VER_BUILD(adapter->params.fw_vers));
	dev_info(adapter, "TP Microcode version: %u.%u.%u.%u\n",
		 G_FW_HDR_FW_VER_MAJOR(adapter->params.tp_vers),
		 G_FW_HDR_FW_VER_MINOR(adapter->params.tp_vers),
		 G_FW_HDR_FW_VER_MICRO(adapter->params.tp_vers),
		 G_FW_HDR_FW_VER_BUILD(adapter->params.tp_vers));
	return 0;
}
int t4vf_get_dev_params ( struct adapter * adapter ) { u32 params [ 7 ] , vals [ 7 ] ; int v ; params [ 0 ] = ( V_FW_PARAMS_MNEM ( FW_PARAMS_MNEM_DEV ) | V_FW_PARAMS_PARAM_X ( FW_PARAMS_PARAM_DEV_FWREV ) ) ; params [ 1 ] = ( V_FW_PARAMS_MNEM ( FW_PARAMS_MNEM_DEV ) | V_FW_PARAMS_PARAM_X ( FW_PARAMS_PARAM_DEV_TPREV ) ) ; v = t4vf_query_params ( adapter , 2 , params , vals ) ; if ( v != FW_SUCCESS ) return v ; adapter -> params . fw_vers = vals [ 0 ] ; adapter -> params . tp_vers = vals [ 1 ] ; dev_info ( adapter , " \n " , G_FW_HDR_FW_VER_MAJOR ( adapter -> params . fw_vers ) , G_FW_HDR_FW_VER_MINOR ( adapter -> params . fw_vers ) , G_FW_HDR_FW_VER_MICRO ( adapter -> params . fw_vers ) , G_FW_HDR_FW_VER_BUILD ( adapter -> params . fw_vers ) ) ; dev_info ( adapter , " \n " , G_FW_HDR_FW_VER_MAJOR ( adapter -> params . tp_vers ) , G_FW_HDR_FW_VER_MINOR ( adapter -> params . tp_vers ) , G_FW_HDR_FW_VER_MICRO ( adapter -> params . tp_vers ) , G_FW_HDR_FW_VER_BUILD ( adapter -> params . tp_vers ) ) ; return 0 ; }
t4vf_get_dev_params - retrieve device paremeters
 @adapter: the adapter
t4vf_get_dev_params - retrieve device paremeters @adapter : the adapter