aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-taskfile.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:10 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:10 -0500
commit657cc1a8f6cd6a9e2974cba3af9fccd8c25e06ad (patch)
tree4f1542ec2738993193ac4c02cba78aa4ed981f80 /drivers/ide/ide-taskfile.c
parent3687221f28058c40e2c57a286decd0caeac67382 (diff)
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 <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r--drivers/ide/ide-taskfile.c9
1 files changed, 5 insertions, 4 deletions
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)
99 args.tf.command = WIN_IDENTIFY; 99 args.tf.command = WIN_IDENTIFY;
100 else 100 else
101 args.tf.command = WIN_PIDENTIFY; 101 args.tf.command = WIN_PIDENTIFY;
102 args.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; 102 args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
103 args.data_phase = TASKFILE_IN; 103 args.data_phase = TASKFILE_IN;
104 return ide_raw_taskfile(drive, &args, buf, 1); 104 return ide_raw_taskfile(drive, &args, buf, 1);
105} 105}
@@ -618,9 +618,10 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
618 618
619 args.data_phase = req_task->data_phase; 619 args.data_phase = req_task->data_phase;
620 620
621 args.tf_flags = IDE_TFLAG_IO_16BIT | IDE_TFLAG_OUT_DEVICE; 621 args.tf_flags = IDE_TFLAG_IO_16BIT | IDE_TFLAG_DEVICE |
622 IDE_TFLAG_IN_TF;
622 if (drive->addressing == 1) 623 if (drive->addressing == 1)
623 args.tf_flags |= IDE_TFLAG_LBA48; 624 args.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_IN_HOB);
624 625
625 if (req_task->out_flags.all) { 626 if (req_task->out_flags.all) {
626 args.tf_flags |= IDE_TFLAG_FLAGGED; 627 args.tf_flags |= IDE_TFLAG_FLAGGED;
@@ -836,7 +837,7 @@ int ide_task_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
836 memset(&task, 0, sizeof(task)); 837 memset(&task, 0, sizeof(task));
837 memcpy(&task.tf_array[7], &args[1], 6); 838 memcpy(&task.tf_array[7], &args[1], 6);
838 task.tf.command = args[0]; 839 task.tf.command = args[0];
839 task.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; 840 task.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
840 841
841 err = ide_no_data_taskfile(drive, &task); 842 err = ide_no_data_taskfile(drive, &task);
842 843