aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-acpi.c2
-rw-r--r--drivers/ide/ide-disk.c24
-rw-r--r--drivers/ide/ide-io.c8
-rw-r--r--drivers/ide/ide-taskfile.c9
-rw-r--r--include/linux/ide.h6
5 files changed, 26 insertions, 23 deletions
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index e0bb0cfa7bdd..e888fc35b27c 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -386,7 +386,7 @@ static int taskfile_load_raw(ide_drive_t *drive,
386 386
387 /* convert gtf to IDE Taskfile */ 387 /* convert gtf to IDE Taskfile */
388 memcpy(&args.tf_array[7], &gtf->tfa, 7); 388 memcpy(&args.tf_array[7], &gtf->tfa, 7);
389 args.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; 389 args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
390 390
391 if (ide_noacpitfs) { 391 if (ide_noacpitfs) {
392 DEBPRINT("_GTF execution disabled\n"); 392 DEBPRINT("_GTF execution disabled\n");
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 041be43a62cb..027bf4397592 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -201,7 +201,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
201 201
202 memset(&task, 0, sizeof(task)); 202 memset(&task, 0, sizeof(task));
203 task.tf_flags = IDE_TFLAG_NO_SELECT_MASK; /* FIXME? */ 203 task.tf_flags = IDE_TFLAG_NO_SELECT_MASK; /* FIXME? */
204 task.tf_flags |= (IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE); 204 task.tf_flags |= (IDE_TFLAG_TF | IDE_TFLAG_DEVICE);
205 205
206 if (drive->select.b.lba) { 206 if (drive->select.b.lba) {
207 if (lba48) { 207 if (lba48) {
@@ -220,7 +220,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
220 tf->lbam = (u8)(block >> 8); 220 tf->lbam = (u8)(block >> 8);
221 tf->lbah = (u8)(block >> 16); 221 tf->lbah = (u8)(block >> 16);
222 222
223 task.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_OUT_HOB); 223 task.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB);
224 } else { 224 } else {
225 tf->nsect = nsectors & 0xff; 225 tf->nsect = nsectors & 0xff;
226 tf->lbal = block; 226 tf->lbal = block;
@@ -314,9 +314,9 @@ static u64 idedisk_read_native_max_address(ide_drive_t *drive, int lba48)
314 else 314 else
315 tf->command = WIN_READ_NATIVE_MAX; 315 tf->command = WIN_READ_NATIVE_MAX;
316 tf->device = ATA_LBA; 316 tf->device = ATA_LBA;
317 args.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; 317 args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
318 if (lba48) 318 if (lba48)
319 args.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_OUT_HOB); 319 args.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB);
320 /* submit command request */ 320 /* submit command request */
321 ide_no_data_taskfile(drive, &args); 321 ide_no_data_taskfile(drive, &args);
322 322
@@ -353,9 +353,9 @@ static u64 idedisk_set_max_address(ide_drive_t *drive, u64 addr_req, int lba48)
353 tf->command = WIN_SET_MAX; 353 tf->command = WIN_SET_MAX;
354 } 354 }
355 tf->device |= ATA_LBA; 355 tf->device |= ATA_LBA;
356 args.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; 356 args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
357 if (lba48) 357 if (lba48)
358 args.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_OUT_HOB); 358 args.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB);
359 /* submit command request */ 359 /* submit command request */
360 ide_no_data_taskfile(drive, &args); 360 ide_no_data_taskfile(drive, &args);
361 /* if OK, compute maximum address value */ 361 /* if OK, compute maximum address value */
@@ -495,7 +495,7 @@ static int smart_enable(ide_drive_t *drive)
495 tf->lbam = SMART_LCYL_PASS; 495 tf->lbam = SMART_LCYL_PASS;
496 tf->lbah = SMART_HCYL_PASS; 496 tf->lbah = SMART_HCYL_PASS;
497 tf->command = WIN_SMART; 497 tf->command = WIN_SMART;
498 args.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; 498 args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
499 return ide_no_data_taskfile(drive, &args); 499 return ide_no_data_taskfile(drive, &args);
500} 500}
501 501
@@ -510,7 +510,7 @@ static int get_smart_data(ide_drive_t *drive, u8 *buf, u8 sub_cmd)
510 tf->lbam = SMART_LCYL_PASS; 510 tf->lbam = SMART_LCYL_PASS;
511 tf->lbah = SMART_HCYL_PASS; 511 tf->lbah = SMART_HCYL_PASS;
512 tf->command = WIN_SMART; 512 tf->command = WIN_SMART;
513 args.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; 513 args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
514 args.data_phase = TASKFILE_IN; 514 args.data_phase = TASKFILE_IN;
515 (void) smart_enable(drive); 515 (void) smart_enable(drive);
516 return ide_raw_taskfile(drive, &args, buf, 1); 516 return ide_raw_taskfile(drive, &args, buf, 1);
@@ -689,7 +689,7 @@ static int write_cache(ide_drive_t *drive, int arg)
689 args.tf.feature = arg ? 689 args.tf.feature = arg ?
690 SETFEATURES_EN_WCACHE : SETFEATURES_DIS_WCACHE; 690 SETFEATURES_EN_WCACHE : SETFEATURES_DIS_WCACHE;
691 args.tf.command = WIN_SETFEATURES; 691 args.tf.command = WIN_SETFEATURES;
692 args.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; 692 args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
693 err = ide_no_data_taskfile(drive, &args); 693 err = ide_no_data_taskfile(drive, &args);
694 if (err == 0) 694 if (err == 0)
695 drive->wcache = arg; 695 drive->wcache = arg;
@@ -709,7 +709,7 @@ static int do_idedisk_flushcache (ide_drive_t *drive)
709 args.tf.command = WIN_FLUSH_CACHE_EXT; 709 args.tf.command = WIN_FLUSH_CACHE_EXT;
710 else 710 else
711 args.tf.command = WIN_FLUSH_CACHE; 711 args.tf.command = WIN_FLUSH_CACHE;
712 args.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; 712 args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
713 return ide_no_data_taskfile(drive, &args); 713 return ide_no_data_taskfile(drive, &args);
714} 714}
715 715
@@ -724,7 +724,7 @@ static int set_acoustic (ide_drive_t *drive, int arg)
724 args.tf.feature = arg ? SETFEATURES_EN_AAM : SETFEATURES_DIS_AAM; 724 args.tf.feature = arg ? SETFEATURES_EN_AAM : SETFEATURES_DIS_AAM;
725 args.tf.nsect = arg; 725 args.tf.nsect = arg;
726 args.tf.command = WIN_SETFEATURES; 726 args.tf.command = WIN_SETFEATURES;
727 args.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; 727 args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
728 ide_no_data_taskfile(drive, &args); 728 ide_no_data_taskfile(drive, &args);
729 drive->acoustic = arg; 729 drive->acoustic = arg;
730 return 0; 730 return 0;
@@ -975,7 +975,7 @@ static int idedisk_set_doorlock(ide_drive_t *drive, int on)
975 975
976 memset(&task, 0, sizeof(task)); 976 memset(&task, 0, sizeof(task));
977 task.tf.command = on ? WIN_DOORLOCK : WIN_DOORUNLOCK; 977 task.tf.command = on ? WIN_DOORLOCK : WIN_DOORUNLOCK;
978 task.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; 978 task.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
979 979
980 return ide_no_data_taskfile(drive, &task); 980 return ide_no_data_taskfile(drive, &task);
981} 981}
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index f01b103e55f0..0f3e2f4f9c2c 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -231,7 +231,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
231 return ide_stopped; 231 return ide_stopped;
232 232
233out_do_tf: 233out_do_tf:
234 args->tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE; 234 args->tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
235 args->data_phase = TASKFILE_NO_DATA; 235 args->data_phase = TASKFILE_NO_DATA;
236 return do_rw_taskfile(drive, args); 236 return do_rw_taskfile(drive, args);
237} 237}
@@ -385,10 +385,6 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err)
385 tf->error = err; 385 tf->error = err;
386 tf->status = stat; 386 tf->status = stat;
387 387
388 args->tf_flags |= (IDE_TFLAG_IN_TF|IDE_TFLAG_IN_DEVICE);
389 if (args->tf_flags & IDE_TFLAG_LBA48)
390 args->tf_flags |= IDE_TFLAG_IN_HOB;
391
392 ide_tf_read(drive, args); 388 ide_tf_read(drive, args);
393 } 389 }
394 } else if (blk_pm_request(rq)) { 390 } else if (blk_pm_request(rq)) {
@@ -712,7 +708,7 @@ static ide_startstop_t ide_disk_special(ide_drive_t *drive)
712 return ide_stopped; 708 return ide_stopped;
713 } 709 }
714 710
715 args.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE | 711 args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE |
716 IDE_TFLAG_CUSTOM_HANDLER; 712 IDE_TFLAG_CUSTOM_HANDLER;
717 713
718 do_rw_taskfile(drive, &args); 714 do_rw_taskfile(drive, &args);
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index bc3d8aed9a8d..1f664ea57e58 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
diff --git a/include/linux/ide.h b/include/linux/ide.h
index c1a8b8bb93ab..02493dbb156d 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -931,6 +931,12 @@ enum {
931 IDE_TFLAG_IN_TF = IDE_TFLAG_IN_NSECT | 931 IDE_TFLAG_IN_TF = IDE_TFLAG_IN_NSECT |
932 IDE_TFLAG_IN_LBA, 932 IDE_TFLAG_IN_LBA,
933 IDE_TFLAG_IN_DEVICE = (1 << 29), 933 IDE_TFLAG_IN_DEVICE = (1 << 29),
934 IDE_TFLAG_HOB = IDE_TFLAG_OUT_HOB |
935 IDE_TFLAG_IN_HOB,
936 IDE_TFLAG_TF = IDE_TFLAG_OUT_TF |
937 IDE_TFLAG_IN_TF,
938 IDE_TFLAG_DEVICE = IDE_TFLAG_OUT_DEVICE |
939 IDE_TFLAG_IN_DEVICE,
934 /* force 16-bit I/O operations */ 940 /* force 16-bit I/O operations */
935 IDE_TFLAG_IO_16BIT = (1 << 30), 941 IDE_TFLAG_IO_16BIT = (1 << 30),
936}; 942};