From 657cc1a8f6cd6a9e2974cba3af9fccd8c25e06ad Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Sat, 26 Jan 2008 20:13:10 +0100 Subject: ide: set IDE_TFLAG_IN_* flags before queuing/executing command * Add IDE_TFLAG_{HOB,TF,DEVICE} defines. * Set IDE_TFLAG_IN_* flags in {do_rw,ide_no_data,ide_raw}_taskfile() users. * Remove no longer needed ->tf_flags setup from ide_end_drive_cmd(). There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/ide-taskfile.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/ide/ide-taskfile.c') diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index bc3d8aed9a8..1f664ea57e5 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c @@ -99,7 +99,7 @@ int taskfile_lib_get_identify (ide_drive_t *drive, u8 *buf) args.tf.command = WIN_IDENTIFY; else args.tf.command = WIN_PIDENTIFY; - args.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; + args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; args.data_phase = TASKFILE_IN; return ide_raw_taskfile(drive, &args, buf, 1); } @@ -618,9 +618,10 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) args.data_phase = req_task->data_phase; - args.tf_flags = IDE_TFLAG_IO_16BIT | IDE_TFLAG_OUT_DEVICE; + args.tf_flags = IDE_TFLAG_IO_16BIT | IDE_TFLAG_DEVICE | + IDE_TFLAG_IN_TF; if (drive->addressing == 1) - args.tf_flags |= IDE_TFLAG_LBA48; + args.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_IN_HOB); if (req_task->out_flags.all) { args.tf_flags |= IDE_TFLAG_FLAGGED; @@ -836,7 +837,7 @@ int ide_task_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) memset(&task, 0, sizeof(task)); memcpy(&task.tf_array[7], &args[1], 6); task.tf.command = args[0]; - task.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; + task.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; err = ide_no_data_taskfile(drive, &task); -- cgit v1.2.3