/* According to the ACPI spec this should be called after _STM has been evaluated for the interface. Some ACPI vendors interpret that as a hard requirement and modify the taskfile according to the Identify Drive information passed down with _STM. So one should really make sure to call this only after _STM has been executed.  */
int ide_acpi_exec_tfs(ide_drive_t *drive)
/* According to the ACPI spec this should be called after _STM has been evaluated for the interface. Some ACPI vendors interpret that as a hard requirement and modify the taskfile according to the Identify Drive information passed down with _STM. So one should really make sure to call this only after _STM has been executed.  */
int ide_acpi_exec_tfs(ide_drive_t *drive)
{
	int		ret;
	unsigned int	gtf_length;
	unsigned long	gtf_address;
	unsigned long	obj_loc;
	DEBPRINT("call get_GTF, drive=%s port=%d\n", drive->name, drive->dn);
	ret = do_drive_get_GTF(drive, &gtf_length, &gtf_address, &obj_loc);
	if (ret < 0) {
		DEBPRINT("get_GTF error (%d)\n", ret);
		return ret;
	}
	DEBPRINT("call set_taskfiles, drive=%s\n", drive->name);
	ret = do_drive_set_taskfiles(drive, gtf_length, gtf_address);
	kfree((void *)obj_loc);
	if (ret < 0) {
		DEBPRINT("set_taskfiles error (%d)\n", ret);
	}
	DEBPRINT("ret=%d\n", ret);
	return ret;
}