/* asd_verify_flash_seg - verify data with flash memory @asd_ha: pointer to the host adapter structure @src: pointer to the source data to be verified @dest_offset: offset from flash memory @bytes_to_verify: total bytes to verify  */
int asd_verify_flash_seg(struct asd_ha_struct *asd_ha, const void *src, u32 dest_offset, u32 bytes_to_verify)
/* asd_verify_flash_seg - verify data with flash memory @asd_ha: pointer to the host adapter structure @src: pointer to the source data to be verified @dest_offset: offset from flash memory @bytes_to_verify: total bytes to verify  */
int asd_verify_flash_seg(struct asd_ha_struct *asd_ha, const void *src, u32 dest_offset, u32 bytes_to_verify)
{
	const u8 *src_buf;
	u8 flash_char;
	int err;
	u32 nv_offset, reg, i;
	reg = asd_ha->hw_prof.flash.bar;
	src_buf = NULL;
	err = FLASH_OK;
	nv_offset = dest_offset;
	src_buf = (const u8 *)src;
	for (i = 0; i < bytes_to_verify; i++) {
		flash_char = asd_read_reg_byte(asd_ha, reg + nv_offset + i);
		if (flash_char != src_buf[i]) {
			err = FAIL_VERIFY;
			break;
		}
	}
	return err;
}