aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:28 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:28 -0400
commit19710d25d50ae0be05eebe4231ed8918b1092d82 (patch)
tree2ec84e215d6dd07afcf3433e8f920bb6919d3f88 /drivers
parentc094ea0774d6881598da430ea0916a597162f8df (diff)
ide: add "flagged" taskfile flags to struct ide_taskfile (v2)
* Add ->ftf_flags field to struct ide_taskfile and convert flags for TASKFILE ioctl to use it. * Rename "flagged" taskfile flags: - IDE_TFLAG_FLAGGED -> IDE_FTFLAG_FLAGGED - IDE_TFLAG_FLAGGED_SET_IN_FLAGS -> IDE_FTFLAG_SET_IN_FLAGS - IDE_TFLAG_{OUT,IN}_DATA -> IDE_FTFLAG_{OUT,IN}_DATA v2: * Remember to fully update ide-h8300.c, scc_pata.c and tx493{8,9}ide.c (thanks to Stephen Rothwell for noticing). There should be no functional changes caused by this patch. Cc: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/at91_ide.c6
-rw-r--r--drivers/ide/ide-h8300.c6
-rw-r--r--drivers/ide/ide-io-std.c6
-rw-r--r--drivers/ide/ide-taskfile.c12
-rw-r--r--drivers/ide/ns87415.c2
-rw-r--r--drivers/ide/scc_pata.c6
-rw-r--r--drivers/ide/tx4938ide.c6
-rw-r--r--drivers/ide/tx4939ide.c6
8 files changed, 25 insertions, 25 deletions
diff --git a/drivers/ide/at91_ide.c b/drivers/ide/at91_ide.c
index 4bd46d2d6b64..6eabf9e31290 100644
--- a/drivers/ide/at91_ide.c
+++ b/drivers/ide/at91_ide.c
@@ -192,10 +192,10 @@ static void at91_ide_tf_load(ide_drive_t *drive, ide_task_t *task)
192 struct ide_taskfile *tf = &task->tf; 192 struct ide_taskfile *tf = &task->tf;
193 u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; 193 u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF;
194 194
195 if (task->tf_flags & IDE_TFLAG_FLAGGED) 195 if (task->tf_flags & IDE_FTFLAG_FLAGGED)
196 HIHI = 0xFF; 196 HIHI = 0xFF;
197 197
198 if (task->tf_flags & IDE_TFLAG_OUT_DATA) { 198 if (task->tf_flags & IDE_FTFLAG_OUT_DATA) {
199 u16 data = (tf->hob_data << 8) | tf->data; 199 u16 data = (tf->hob_data << 8) | tf->data;
200 200
201 at91_ide_output_data(drive, NULL, &data, 2); 201 at91_ide_output_data(drive, NULL, &data, 2);
@@ -233,7 +233,7 @@ static void at91_ide_tf_read(ide_drive_t *drive, ide_task_t *task)
233 struct ide_io_ports *io_ports = &hwif->io_ports; 233 struct ide_io_ports *io_ports = &hwif->io_ports;
234 struct ide_taskfile *tf = &task->tf; 234 struct ide_taskfile *tf = &task->tf;
235 235
236 if (task->tf_flags & IDE_TFLAG_IN_DATA) { 236 if (task->tf_flags & IDE_FTFLAG_IN_DATA) {
237 u16 data; 237 u16 data;
238 238
239 at91_ide_input_data(drive, NULL, &data, 2); 239 at91_ide_input_data(drive, NULL, &data, 2);
diff --git a/drivers/ide/ide-h8300.c b/drivers/ide/ide-h8300.c
index 9270d3255ee0..11e937485bff 100644
--- a/drivers/ide/ide-h8300.c
+++ b/drivers/ide/ide-h8300.c
@@ -51,10 +51,10 @@ static void h8300_tf_load(ide_drive_t *drive, ide_task_t *task)
51 struct ide_taskfile *tf = &task->tf; 51 struct ide_taskfile *tf = &task->tf;
52 u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; 52 u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF;
53 53
54 if (task->tf_flags & IDE_TFLAG_FLAGGED) 54 if (task->ftf_flags & IDE_FTFLAG_FLAGGED)
55 HIHI = 0xFF; 55 HIHI = 0xFF;
56 56
57 if (task->tf_flags & IDE_TFLAG_OUT_DATA) 57 if (task->ftf_flags & IDE_FTFLAG_OUT_DATA)
58 mm_outw((tf->hob_data << 8) | tf->data, io_ports->data_addr); 58 mm_outw((tf->hob_data << 8) | tf->data, io_ports->data_addr);
59 59
60 if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) 60 if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
@@ -90,7 +90,7 @@ static void h8300_tf_read(ide_drive_t *drive, ide_task_t *task)
90 struct ide_io_ports *io_ports = &hwif->io_ports; 90 struct ide_io_ports *io_ports = &hwif->io_ports;
91 struct ide_taskfile *tf = &task->tf; 91 struct ide_taskfile *tf = &task->tf;
92 92
93 if (task->tf_flags & IDE_TFLAG_IN_DATA) { 93 if (task->ftf_flags & IDE_FTFLAG_IN_DATA) {
94 u16 data = mm_inw(io_ports->data_addr); 94 u16 data = mm_inw(io_ports->data_addr);
95 95
96 tf->data = data & 0xff; 96 tf->data = data & 0xff;
diff --git a/drivers/ide/ide-io-std.c b/drivers/ide/ide-io-std.c
index 9a8da6744d93..cad59f0bfbce 100644
--- a/drivers/ide/ide-io-std.c
+++ b/drivers/ide/ide-io-std.c
@@ -96,10 +96,10 @@ void ide_tf_load(ide_drive_t *drive, ide_task_t *task)
96 else 96 else
97 tf_outb = ide_outb; 97 tf_outb = ide_outb;
98 98
99 if (task->tf_flags & IDE_TFLAG_FLAGGED) 99 if (task->ftf_flags & IDE_FTFLAG_FLAGGED)
100 HIHI = 0xFF; 100 HIHI = 0xFF;
101 101
102 if (task->tf_flags & IDE_TFLAG_OUT_DATA) { 102 if (task->ftf_flags & IDE_FTFLAG_OUT_DATA) {
103 u16 data = (tf->hob_data << 8) | tf->data; 103 u16 data = (tf->hob_data << 8) | tf->data;
104 104
105 if (mmio) 105 if (mmio)
@@ -153,7 +153,7 @@ void ide_tf_read(ide_drive_t *drive, ide_task_t *task)
153 tf_inb = ide_inb; 153 tf_inb = ide_inb;
154 } 154 }
155 155
156 if (task->tf_flags & IDE_TFLAG_IN_DATA) { 156 if (task->ftf_flags & IDE_FTFLAG_IN_DATA) {
157 u16 data; 157 u16 data;
158 158
159 if (mmio) 159 if (mmio)
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 2461245820b7..02240a3ee0fb 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -73,8 +73,8 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
73 } 73 }
74 } 74 }
75 75
76 if (task->tf_flags & IDE_TFLAG_FLAGGED) 76 if (task->ftf_flags & IDE_FTFLAG_FLAGGED)
77 task->tf_flags |= IDE_TFLAG_FLAGGED_SET_IN_FLAGS; 77 task->ftf_flags |= IDE_FTFLAG_SET_IN_FLAGS;
78 78
79 memcpy(&hwif->task, task, sizeof(*task)); 79 memcpy(&hwif->task, task, sizeof(*task));
80 80
@@ -551,10 +551,10 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
551 args.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_IN_HOB); 551 args.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_IN_HOB);
552 552
553 if (req_task->out_flags.all) { 553 if (req_task->out_flags.all) {
554 args.tf_flags |= IDE_TFLAG_FLAGGED; 554 args.ftf_flags |= IDE_FTFLAG_FLAGGED;
555 555
556 if (req_task->out_flags.b.data) 556 if (req_task->out_flags.b.data)
557 args.tf_flags |= IDE_TFLAG_OUT_DATA; 557 args.ftf_flags |= IDE_FTFLAG_OUT_DATA;
558 558
559 if (req_task->out_flags.b.nsector_hob) 559 if (req_task->out_flags.b.nsector_hob)
560 args.tf_flags |= IDE_TFLAG_OUT_HOB_NSECT; 560 args.tf_flags |= IDE_TFLAG_OUT_HOB_NSECT;
@@ -582,7 +582,7 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
582 } 582 }
583 583
584 if (req_task->in_flags.b.data) 584 if (req_task->in_flags.b.data)
585 args.tf_flags |= IDE_TFLAG_IN_DATA; 585 args.ftf_flags |= IDE_FTFLAG_IN_DATA;
586 586
587 switch(req_task->data_phase) { 587 switch(req_task->data_phase) {
588 case TASKFILE_MULTI_OUT: 588 case TASKFILE_MULTI_OUT:
@@ -647,7 +647,7 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
647 memcpy(req_task->hob_ports, &args.tf_array[0], HDIO_DRIVE_HOB_HDR_SIZE - 2); 647 memcpy(req_task->hob_ports, &args.tf_array[0], HDIO_DRIVE_HOB_HDR_SIZE - 2);
648 memcpy(req_task->io_ports, &args.tf_array[6], HDIO_DRIVE_TASK_HDR_SIZE); 648 memcpy(req_task->io_ports, &args.tf_array[6], HDIO_DRIVE_TASK_HDR_SIZE);
649 649
650 if ((args.tf_flags & IDE_TFLAG_FLAGGED_SET_IN_FLAGS) && 650 if ((args.ftf_flags & IDE_FTFLAG_SET_IN_FLAGS) &&
651 req_task->in_flags.all == 0) { 651 req_task->in_flags.all == 0) {
652 req_task->in_flags.all = IDE_TASKFILE_STD_IN_FLAGS; 652 req_task->in_flags.all = IDE_TASKFILE_STD_IN_FLAGS;
653 if (drive->dev_flags & IDE_DFLAG_LBA48) 653 if (drive->dev_flags & IDE_DFLAG_LBA48)
diff --git a/drivers/ide/ns87415.c b/drivers/ide/ns87415.c
index ea48a3ee8063..159eb39c7932 100644
--- a/drivers/ide/ns87415.c
+++ b/drivers/ide/ns87415.c
@@ -66,7 +66,7 @@ static void superio_tf_read(ide_drive_t *drive, ide_task_t *task)
66 struct ide_io_ports *io_ports = &drive->hwif->io_ports; 66 struct ide_io_ports *io_ports = &drive->hwif->io_ports;
67 struct ide_taskfile *tf = &task->tf; 67 struct ide_taskfile *tf = &task->tf;
68 68
69 if (task->tf_flags & IDE_TFLAG_IN_DATA) { 69 if (task->ftf_flags & IDE_FTFLAG_IN_DATA) {
70 u16 data = inw(io_ports->data_addr); 70 u16 data = inw(io_ports->data_addr);
71 71
72 tf->data = data & 0xff; 72 tf->data = data & 0xff;
diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c
index ae965da5dde0..82929c725d82 100644
--- a/drivers/ide/scc_pata.c
+++ b/drivers/ide/scc_pata.c
@@ -672,10 +672,10 @@ static void scc_tf_load(ide_drive_t *drive, ide_task_t *task)
672 struct ide_taskfile *tf = &task->tf; 672 struct ide_taskfile *tf = &task->tf;
673 u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; 673 u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF;
674 674
675 if (task->tf_flags & IDE_TFLAG_FLAGGED) 675 if (task->ftf_flags & IDE_FTFLAG_FLAGGED)
676 HIHI = 0xFF; 676 HIHI = 0xFF;
677 677
678 if (task->tf_flags & IDE_TFLAG_OUT_DATA) 678 if (task->ftf_flags & IDE_FTFLAG_OUT_DATA)
679 out_be32((void *)io_ports->data_addr, 679 out_be32((void *)io_ports->data_addr,
680 (tf->hob_data << 8) | tf->data); 680 (tf->hob_data << 8) | tf->data);
681 681
@@ -711,7 +711,7 @@ static void scc_tf_read(ide_drive_t *drive, ide_task_t *task)
711 struct ide_io_ports *io_ports = &drive->hwif->io_ports; 711 struct ide_io_ports *io_ports = &drive->hwif->io_ports;
712 struct ide_taskfile *tf = &task->tf; 712 struct ide_taskfile *tf = &task->tf;
713 713
714 if (task->tf_flags & IDE_TFLAG_IN_DATA) { 714 if (task->ftf_flags & IDE_FTFLAG_IN_DATA) {
715 u16 data = (u16)in_be32((void *)io_ports->data_addr); 715 u16 data = (u16)in_be32((void *)io_ports->data_addr);
716 716
717 tf->data = data & 0xff; 717 tf->data = data & 0xff;
diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c
index efade9e898b3..6b51e0c58af7 100644
--- a/drivers/ide/tx4938ide.c
+++ b/drivers/ide/tx4938ide.c
@@ -89,10 +89,10 @@ static void tx4938ide_tf_load(ide_drive_t *drive, ide_task_t *task)
89 struct ide_taskfile *tf = &task->tf; 89 struct ide_taskfile *tf = &task->tf;
90 u8 HIHI = task->tf_flags & IDE_TFLAG_LBA48 ? 0xE0 : 0xEF; 90 u8 HIHI = task->tf_flags & IDE_TFLAG_LBA48 ? 0xE0 : 0xEF;
91 91
92 if (task->tf_flags & IDE_TFLAG_FLAGGED) 92 if (task->ftf_flags & IDE_FTFLAG_FLAGGED)
93 HIHI = 0xFF; 93 HIHI = 0xFF;
94 94
95 if (task->tf_flags & IDE_TFLAG_OUT_DATA) { 95 if (task->ftf_flags & IDE_FTFLAG_OUT_DATA) {
96 u16 data = (tf->hob_data << 8) | tf->data; 96 u16 data = (tf->hob_data << 8) | tf->data;
97 97
98 /* no endian swap */ 98 /* no endian swap */
@@ -132,7 +132,7 @@ static void tx4938ide_tf_read(ide_drive_t *drive, ide_task_t *task)
132 struct ide_io_ports *io_ports = &hwif->io_ports; 132 struct ide_io_ports *io_ports = &hwif->io_ports;
133 struct ide_taskfile *tf = &task->tf; 133 struct ide_taskfile *tf = &task->tf;
134 134
135 if (task->tf_flags & IDE_TFLAG_IN_DATA) { 135 if (task->ftf_flags & IDE_FTFLAG_IN_DATA) {
136 u16 data; 136 u16 data;
137 137
138 /* no endian swap */ 138 /* no endian swap */
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index fb037a5e70b3..f0033eb2e885 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -474,10 +474,10 @@ static void tx4939ide_tf_load(ide_drive_t *drive, ide_task_t *task)
474 struct ide_taskfile *tf = &task->tf; 474 struct ide_taskfile *tf = &task->tf;
475 u8 HIHI = task->tf_flags & IDE_TFLAG_LBA48 ? 0xE0 : 0xEF; 475 u8 HIHI = task->tf_flags & IDE_TFLAG_LBA48 ? 0xE0 : 0xEF;
476 476
477 if (task->tf_flags & IDE_TFLAG_FLAGGED) 477 if (task->ftf_flags & IDE_FTFLAG_FLAGGED)
478 HIHI = 0xFF; 478 HIHI = 0xFF;
479 479
480 if (task->tf_flags & IDE_TFLAG_OUT_DATA) { 480 if (task->ftf_flags & IDE_FTFLAG_OUT_DATA) {
481 u16 data = (tf->hob_data << 8) | tf->data; 481 u16 data = (tf->hob_data << 8) | tf->data;
482 482
483 /* no endian swap */ 483 /* no endian swap */
@@ -519,7 +519,7 @@ static void tx4939ide_tf_read(ide_drive_t *drive, ide_task_t *task)
519 struct ide_io_ports *io_ports = &hwif->io_ports; 519 struct ide_io_ports *io_ports = &hwif->io_ports;
520 struct ide_taskfile *tf = &task->tf; 520 struct ide_taskfile *tf = &task->tf;
521 521
522 if (task->tf_flags & IDE_TFLAG_IN_DATA) { 522 if (task->ftf_flags & IDE_FTFLAG_IN_DATA) {
523 u16 data; 523 u16 data;
524 524
525 /* no endian swap */ 525 /* no endian swap */