FreeBSD/sys/dev/cxgb/common/cxgb_t3_hw.c
/**
 *	t3_get_fw_version - read the firmware version
 *	@adapter: the adapter
 *	@vers: where to place the version
 *
 *	Reads the FW version from flash. Note that we had to move the version
 *	due to FW size. If we don't find a valid FW version in the new location
 *	we fall back and read the old location.
 */
read the firmware version
@adapter: the adapter
@vers: where to place the version

Reads the FW version from flash. Note that we had to move the version
due to FW size. If we don't find a valid FW version in the new location
we fall back and read the old location.
read the firmware version @adapter : the adapter @vers : where to place the version Reads the FW version from flash . Note that we had to move the version due to FW size . If we don ' t find a valid FW version in the new location we fall back and read the old location .
int t3_get_fw_version(adapter_t *adapter, u32 *vers)
{
	int ret = t3_read_flash(adapter, FW_VERS_ADDR, 1, vers, 0);
	if (!ret && *vers != 0xffffffff)
		return 0;
	else
		return t3_read_flash(adapter, FW_VERS_ADDR_PRE8, 1, vers, 0);
}
int t3_get_fw_version ( adapter_t * adapter , u32 * vers ) { int ret = t3_read_flash ( adapter , FW_VERS_ADDR , 1 , vers , 0 ) ; if ( ! ret && * vers != 0xffffffff ) return 0 ; else return t3_read_flash ( adapter , FW_VERS_ADDR_PRE8 , 1 , vers , 0 ) ; }
t3_get_fw_version - read the firmware version
      @adapter: the adapter
      @vers: where to place the version
t3_get_fw_version - read the firmware version @adapter : the adapter @vers : where to place the version