aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/at91_ide.c16
-rw-r--r--drivers/ide/ide-h8300.c16
-rw-r--r--drivers/ide/ide-io-std.c16
-rw-r--r--drivers/ide/ide-iops.c2
-rw-r--r--drivers/ide/ns87415.c16
-rw-r--r--drivers/ide/scc_pata.c16
-rw-r--r--drivers/ide/tx4938ide.c17
-rw-r--r--drivers/ide/tx4939ide.c17
-rw-r--r--include/linux/ide.h12
9 files changed, 65 insertions, 63 deletions
diff --git a/drivers/ide/at91_ide.c b/drivers/ide/at91_ide.c
index e6e96743aa7b..9dce793d93b4 100644
--- a/drivers/ide/at91_ide.c
+++ b/drivers/ide/at91_ide.c
@@ -244,8 +244,8 @@ static void at91_ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
244 /* be sure we're looking at the low order bits */ 244 /* be sure we're looking at the low order bits */
245 ide_mm_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr); 245 ide_mm_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
246 246
247 if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) 247 if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
248 tf->feature = ide_mm_inb(io_ports->feature_addr); 248 tf->error = ide_mm_inb(io_ports->feature_addr);
249 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT) 249 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
250 tf->nsect = ide_mm_inb(io_ports->nsect_addr); 250 tf->nsect = ide_mm_inb(io_ports->nsect_addr);
251 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) 251 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
@@ -260,16 +260,16 @@ static void at91_ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
260 if (cmd->tf_flags & IDE_TFLAG_LBA48) { 260 if (cmd->tf_flags & IDE_TFLAG_LBA48) {
261 ide_mm_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr); 261 ide_mm_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
262 262
263 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) 263 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
264 tf->hob_feature = ide_mm_inb(io_ports->feature_addr); 264 tf->hob_error = ide_mm_inb(io_ports->feature_addr);
265 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT) 265 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
266 tf->hob_nsect = ide_mm_inb(io_ports->nsect_addr); 266 tf->hob_nsect = ide_mm_inb(io_ports->nsect_addr);
267 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL) 267 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
268 tf->hob_lbal = ide_mm_inb(io_ports->lbal_addr); 268 tf->hob_lbal = ide_mm_inb(io_ports->lbal_addr);
269 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM) 269 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
270 tf->hob_lbam = ide_mm_inb(io_ports->lbam_addr); 270 tf->hob_lbam = ide_mm_inb(io_ports->lbam_addr);
271 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH) 271 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
272 tf->hob_lbah = ide_mm_inb(io_ports->lbah_addr); 272 tf->hob_lbah = ide_mm_inb(io_ports->lbah_addr);
273 } 273 }
274} 274}
275 275
diff --git a/drivers/ide/ide-h8300.c b/drivers/ide/ide-h8300.c
index a57ccad61acf..1d45cd5b6a1c 100644
--- a/drivers/ide/ide-h8300.c
+++ b/drivers/ide/ide-h8300.c
@@ -100,8 +100,8 @@ static void h8300_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
100 /* be sure we're looking at the low order bits */ 100 /* be sure we're looking at the low order bits */
101 outb(ATA_DEVCTL_OBS, io_ports->ctl_addr); 101 outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
102 102
103 if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) 103 if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
104 tf->feature = inb(io_ports->feature_addr); 104 tf->error = inb(io_ports->feature_addr);
105 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT) 105 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
106 tf->nsect = inb(io_ports->nsect_addr); 106 tf->nsect = inb(io_ports->nsect_addr);
107 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) 107 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
@@ -116,16 +116,16 @@ static void h8300_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
116 if (cmd->tf_flags & IDE_TFLAG_LBA48) { 116 if (cmd->tf_flags & IDE_TFLAG_LBA48) {
117 outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr); 117 outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
118 118
119 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) 119 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
120 tf->hob_feature = inb(io_ports->feature_addr); 120 tf->hob_error = inb(io_ports->feature_addr);
121 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT) 121 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
122 tf->hob_nsect = inb(io_ports->nsect_addr); 122 tf->hob_nsect = inb(io_ports->nsect_addr);
123 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL) 123 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
124 tf->hob_lbal = inb(io_ports->lbal_addr); 124 tf->hob_lbal = inb(io_ports->lbal_addr);
125 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM) 125 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
126 tf->hob_lbam = inb(io_ports->lbam_addr); 126 tf->hob_lbam = inb(io_ports->lbam_addr);
127 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH) 127 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
128 tf->hob_lbah = inb(io_ports->lbah_addr); 128 tf->hob_lbah = inb(io_ports->lbah_addr);
129 } 129 }
130} 130}
131 131
diff --git a/drivers/ide/ide-io-std.c b/drivers/ide/ide-io-std.c
index bbeedce6b17d..31f5c5f4c093 100644
--- a/drivers/ide/ide-io-std.c
+++ b/drivers/ide/ide-io-std.c
@@ -159,8 +159,8 @@ void ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
159 /* be sure we're looking at the low order bits */ 159 /* be sure we're looking at the low order bits */
160 tf_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr); 160 tf_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
161 161
162 if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) 162 if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
163 tf->feature = tf_inb(io_ports->feature_addr); 163 tf->error = tf_inb(io_ports->feature_addr);
164 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT) 164 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
165 tf->nsect = tf_inb(io_ports->nsect_addr); 165 tf->nsect = tf_inb(io_ports->nsect_addr);
166 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) 166 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
@@ -175,16 +175,16 @@ void ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
175 if (cmd->tf_flags & IDE_TFLAG_LBA48) { 175 if (cmd->tf_flags & IDE_TFLAG_LBA48) {
176 tf_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr); 176 tf_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
177 177
178 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) 178 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
179 tf->hob_feature = tf_inb(io_ports->feature_addr); 179 tf->hob_error = tf_inb(io_ports->feature_addr);
180 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT) 180 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
181 tf->hob_nsect = tf_inb(io_ports->nsect_addr); 181 tf->hob_nsect = tf_inb(io_ports->nsect_addr);
182 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL) 182 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
183 tf->hob_lbal = tf_inb(io_ports->lbal_addr); 183 tf->hob_lbal = tf_inb(io_ports->lbal_addr);
184 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM) 184 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
185 tf->hob_lbam = tf_inb(io_ports->lbam_addr); 185 tf->hob_lbam = tf_inb(io_ports->lbam_addr);
186 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH) 186 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
187 tf->hob_lbah = tf_inb(io_ports->lbah_addr); 187 tf->hob_lbah = tf_inb(io_ports->lbah_addr);
188 } 188 }
189} 189}
190EXPORT_SYMBOL_GPL(ide_tf_read); 190EXPORT_SYMBOL_GPL(ide_tf_read);
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index ae227dd8466f..6f363a26700d 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -55,7 +55,7 @@ u8 ide_read_error(ide_drive_t *drive)
55 struct ide_cmd cmd; 55 struct ide_cmd cmd;
56 56
57 memset(&cmd, 0, sizeof(cmd)); 57 memset(&cmd, 0, sizeof(cmd));
58 cmd.tf_flags = IDE_TFLAG_IN_FEATURE; 58 cmd.tf_flags = IDE_TFLAG_IN_ERROR;
59 59
60 drive->hwif->tp_ops->tf_read(drive, &cmd); 60 drive->hwif->tp_ops->tf_read(drive, &cmd);
61 61
diff --git a/drivers/ide/ns87415.c b/drivers/ide/ns87415.c
index 00ab0be7335a..0a6cf74c3265 100644
--- a/drivers/ide/ns87415.c
+++ b/drivers/ide/ns87415.c
@@ -76,8 +76,8 @@ static void superio_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
76 /* be sure we're looking at the low order bits */ 76 /* be sure we're looking at the low order bits */
77 outb(ATA_DEVCTL_OBS, io_ports->ctl_addr); 77 outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
78 78
79 if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) 79 if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
80 tf->feature = inb(io_ports->feature_addr); 80 tf->error = inb(io_ports->feature_addr);
81 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT) 81 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
82 tf->nsect = inb(io_ports->nsect_addr); 82 tf->nsect = inb(io_ports->nsect_addr);
83 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) 83 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
@@ -92,16 +92,16 @@ static void superio_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
92 if (cmd->tf_flags & IDE_TFLAG_LBA48) { 92 if (cmd->tf_flags & IDE_TFLAG_LBA48) {
93 outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr); 93 outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
94 94
95 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) 95 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
96 tf->hob_feature = inb(io_ports->feature_addr); 96 tf->hob_error = inb(io_ports->feature_addr);
97 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT) 97 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
98 tf->hob_nsect = inb(io_ports->nsect_addr); 98 tf->hob_nsect = inb(io_ports->nsect_addr);
99 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL) 99 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
100 tf->hob_lbal = inb(io_ports->lbal_addr); 100 tf->hob_lbal = inb(io_ports->lbal_addr);
101 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM) 101 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
102 tf->hob_lbam = inb(io_ports->lbam_addr); 102 tf->hob_lbam = inb(io_ports->lbam_addr);
103 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH) 103 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
104 tf->hob_lbah = inb(io_ports->lbah_addr); 104 tf->hob_lbah = inb(io_ports->lbah_addr);
105 } 105 }
106} 106}
107 107
diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c
index 6ba4983d831c..ea0a9752c6f9 100644
--- a/drivers/ide/scc_pata.c
+++ b/drivers/ide/scc_pata.c
@@ -702,8 +702,8 @@ static void scc_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
702 /* be sure we're looking at the low order bits */ 702 /* be sure we're looking at the low order bits */
703 scc_ide_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr); 703 scc_ide_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
704 704
705 if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) 705 if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
706 tf->feature = scc_ide_inb(io_ports->feature_addr); 706 tf->error = scc_ide_inb(io_ports->feature_addr);
707 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT) 707 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
708 tf->nsect = scc_ide_inb(io_ports->nsect_addr); 708 tf->nsect = scc_ide_inb(io_ports->nsect_addr);
709 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) 709 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
@@ -718,16 +718,16 @@ static void scc_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
718 if (cmd->tf_flags & IDE_TFLAG_LBA48) { 718 if (cmd->tf_flags & IDE_TFLAG_LBA48) {
719 scc_ide_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr); 719 scc_ide_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
720 720
721 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) 721 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
722 tf->hob_feature = scc_ide_inb(io_ports->feature_addr); 722 tf->hob_error = scc_ide_inb(io_ports->feature_addr);
723 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT) 723 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
724 tf->hob_nsect = scc_ide_inb(io_ports->nsect_addr); 724 tf->hob_nsect = scc_ide_inb(io_ports->nsect_addr);
725 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL) 725 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
726 tf->hob_lbal = scc_ide_inb(io_ports->lbal_addr); 726 tf->hob_lbal = scc_ide_inb(io_ports->lbal_addr);
727 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM) 727 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
728 tf->hob_lbam = scc_ide_inb(io_ports->lbam_addr); 728 tf->hob_lbam = scc_ide_inb(io_ports->lbam_addr);
729 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH) 729 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
730 tf->hob_lbah = scc_ide_inb(io_ports->lbah_addr); 730 tf->hob_lbah = scc_ide_inb(io_ports->lbah_addr);
731 } 731 }
732} 732}
733 733
diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c
index ec3aa32fbbe0..606c37f5267d 100644
--- a/drivers/ide/tx4938ide.c
+++ b/drivers/ide/tx4938ide.c
@@ -144,8 +144,8 @@ static void tx4938ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
144 /* be sure we're looking at the low order bits */ 144 /* be sure we're looking at the low order bits */
145 tx4938ide_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr); 145 tx4938ide_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
146 146
147 if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) 147 if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
148 tf->feature = tx4938ide_inb(io_ports->feature_addr); 148 tf->error = tx4938ide_inb(io_ports->feature_addr);
149 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT) 149 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
150 tf->nsect = tx4938ide_inb(io_ports->nsect_addr); 150 tf->nsect = tx4938ide_inb(io_ports->nsect_addr);
151 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) 151 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
@@ -160,17 +160,16 @@ static void tx4938ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
160 if (cmd->tf_flags & IDE_TFLAG_LBA48) { 160 if (cmd->tf_flags & IDE_TFLAG_LBA48) {
161 tx4938ide_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr); 161 tx4938ide_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
162 162
163 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) 163 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
164 tf->hob_feature = 164 tf->hob_error = tx4938ide_inb(io_ports->feature_addr);
165 tx4938ide_inb(io_ports->feature_addr);
166 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT) 165 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
167 tf->hob_nsect = tx4938ide_inb(io_ports->nsect_addr); 166 tf->hob_nsect = tx4938ide_inb(io_ports->nsect_addr);
168 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL) 167 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
169 tf->hob_lbal = tx4938ide_inb(io_ports->lbal_addr); 168 tf->hob_lbal = tx4938ide_inb(io_ports->lbal_addr);
170 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM) 169 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
171 tf->hob_lbam = tx4938ide_inb(io_ports->lbam_addr); 170 tf->hob_lbam = tx4938ide_inb(io_ports->lbam_addr);
172 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH) 171 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
173 tf->hob_lbah = tx4938ide_inb(io_ports->lbah_addr); 172 tf->hob_lbah = tx4938ide_inb(io_ports->lbah_addr);
174 } 173 }
175} 174}
176 175
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index 43bc0372413a..f1e9da71110c 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -511,8 +511,8 @@ static void tx4939ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
511 /* be sure we're looking at the low order bits */ 511 /* be sure we're looking at the low order bits */
512 tx4939ide_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr); 512 tx4939ide_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
513 513
514 if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) 514 if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
515 tf->feature = tx4939ide_inb(io_ports->feature_addr); 515 tf->error = tx4939ide_inb(io_ports->feature_addr);
516 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT) 516 if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
517 tf->nsect = tx4939ide_inb(io_ports->nsect_addr); 517 tf->nsect = tx4939ide_inb(io_ports->nsect_addr);
518 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) 518 if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
@@ -527,17 +527,16 @@ static void tx4939ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
527 if (cmd->tf_flags & IDE_TFLAG_LBA48) { 527 if (cmd->tf_flags & IDE_TFLAG_LBA48) {
528 tx4939ide_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr); 528 tx4939ide_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);
529 529
530 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) 530 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
531 tf->hob_feature = 531 tf->hob_error = tx4939ide_inb(io_ports->feature_addr);
532 tx4939ide_inb(io_ports->feature_addr);
533 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT) 532 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
534 tf->hob_nsect = tx4939ide_inb(io_ports->nsect_addr); 533 tf->hob_nsect = tx4939ide_inb(io_ports->nsect_addr);
535 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL) 534 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
536 tf->hob_lbal = tx4939ide_inb(io_ports->lbal_addr); 535 tf->hob_lbal = tx4939ide_inb(io_ports->lbal_addr);
537 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM) 536 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
538 tf->hob_lbam = tx4939ide_inb(io_ports->lbam_addr); 537 tf->hob_lbam = tx4939ide_inb(io_ports->lbam_addr);
539 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH) 538 if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
540 tf->hob_lbah = tx4939ide_inb(io_ports->lbah_addr); 539 tf->hob_lbah = tx4939ide_inb(io_ports->lbah_addr);
541 } 540 }
542} 541}
543 542
diff --git a/include/linux/ide.h b/include/linux/ide.h
index ccb70abe991b..e919c865f0c7 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -265,7 +265,7 @@ enum {
265 IDE_TFLAG_WRITE = (1 << 12), 265 IDE_TFLAG_WRITE = (1 << 12),
266 IDE_TFLAG_CUSTOM_HANDLER = (1 << 13), 266 IDE_TFLAG_CUSTOM_HANDLER = (1 << 13),
267 IDE_TFLAG_DMA_PIO_FALLBACK = (1 << 14), 267 IDE_TFLAG_DMA_PIO_FALLBACK = (1 << 14),
268 IDE_TFLAG_IN_HOB_FEATURE = (1 << 15), 268 IDE_TFLAG_IN_HOB_ERROR = (1 << 15),
269 IDE_TFLAG_IN_HOB_NSECT = (1 << 16), 269 IDE_TFLAG_IN_HOB_NSECT = (1 << 16),
270 IDE_TFLAG_IN_HOB_LBAL = (1 << 17), 270 IDE_TFLAG_IN_HOB_LBAL = (1 << 17),
271 IDE_TFLAG_IN_HOB_LBAM = (1 << 18), 271 IDE_TFLAG_IN_HOB_LBAM = (1 << 18),
@@ -273,10 +273,10 @@ enum {
273 IDE_TFLAG_IN_HOB_LBA = IDE_TFLAG_IN_HOB_LBAL | 273 IDE_TFLAG_IN_HOB_LBA = IDE_TFLAG_IN_HOB_LBAL |
274 IDE_TFLAG_IN_HOB_LBAM | 274 IDE_TFLAG_IN_HOB_LBAM |
275 IDE_TFLAG_IN_HOB_LBAH, 275 IDE_TFLAG_IN_HOB_LBAH,
276 IDE_TFLAG_IN_HOB = IDE_TFLAG_IN_HOB_FEATURE | 276 IDE_TFLAG_IN_HOB = IDE_TFLAG_IN_HOB_ERROR |
277 IDE_TFLAG_IN_HOB_NSECT | 277 IDE_TFLAG_IN_HOB_NSECT |
278 IDE_TFLAG_IN_HOB_LBA, 278 IDE_TFLAG_IN_HOB_LBA,
279 IDE_TFLAG_IN_FEATURE = (1 << 20), 279 IDE_TFLAG_IN_ERROR = (1 << 20),
280 IDE_TFLAG_IN_NSECT = (1 << 21), 280 IDE_TFLAG_IN_NSECT = (1 << 21),
281 IDE_TFLAG_IN_LBAL = (1 << 22), 281 IDE_TFLAG_IN_LBAL = (1 << 22),
282 IDE_TFLAG_IN_LBAM = (1 << 23), 282 IDE_TFLAG_IN_LBAM = (1 << 23),
@@ -310,8 +310,12 @@ enum {
310 310
311struct ide_taskfile { 311struct ide_taskfile {
312 u8 hob_data; /* 0: high data byte (for TASKFILE IOCTL) */ 312 u8 hob_data; /* 0: high data byte (for TASKFILE IOCTL) */
313 /* 1-5: additional data to support LBA48 */
314 union {
315 u8 hob_error; /* read: error */
316 u8 hob_feature; /* write: feature */
317 };
313 318
314 u8 hob_feature; /* 1-5: additional data to support LBA48 */
315 u8 hob_nsect; 319 u8 hob_nsect;
316 u8 hob_lbal; 320 u8 hob_lbal;
317 u8 hob_lbam; 321 u8 hob_lbam;