diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:37 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:37 -0400 |
commit | 22aa4b32a19b1f231d4ce7e9af6354b577a22a35 (patch) | |
tree | 3e773e7102e4ea6bb6b4c00edce442c4e8f37edb | |
parent | e6830a86c260d73c6f370aa7ed17ee6c71e5ee05 (diff) |
ide: remove ide_task_t typedef
While at it:
- rename struct ide_task_s to struct ide_cmd
- remove stale comments from idedisk_{read_native,set}_max_address()
- drop unused 'cmd' argument from ide_{cmd,task}_ioctl()
- drop unused 'task' argument from tx4939ide_tf_load_fixup()
- rename ide_complete_task() to ide_complete_cmd()
- use consistent naming for struct ide_cmd variables
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/at91_ide.c | 62 | ||||
-rw-r--r-- | drivers/ide/ide-acpi.c | 10 | ||||
-rw-r--r-- | drivers/ide/ide-atapi.c | 42 | ||||
-rw-r--r-- | drivers/ide/ide-disk.c | 121 | ||||
-rw-r--r-- | drivers/ide/ide-disk_proc.c | 23 | ||||
-rw-r--r-- | drivers/ide/ide-eh.c | 6 | ||||
-rw-r--r-- | drivers/ide/ide-h8300.c | 62 | ||||
-rw-r--r-- | drivers/ide/ide-io-std.c | 62 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 40 | ||||
-rw-r--r-- | drivers/ide/ide-ioctls.c | 44 | ||||
-rw-r--r-- | drivers/ide/ide-iops.c | 30 | ||||
-rw-r--r-- | drivers/ide/ide-lib.c | 20 | ||||
-rw-r--r-- | drivers/ide/ide-park.c | 17 | ||||
-rw-r--r-- | drivers/ide/ide-pm.c | 32 | ||||
-rw-r--r-- | drivers/ide/ide-probe.c | 18 | ||||
-rw-r--r-- | drivers/ide/ide-proc.c | 16 | ||||
-rw-r--r-- | drivers/ide/ide-taskfile.c | 148 | ||||
-rw-r--r-- | drivers/ide/ns87415.c | 30 | ||||
-rw-r--r-- | drivers/ide/scc_pata.c | 62 | ||||
-rw-r--r-- | drivers/ide/tx4938ide.c | 62 | ||||
-rw-r--r-- | drivers/ide/tx4939ide.c | 75 | ||||
-rw-r--r-- | include/linux/ide.h | 26 |
22 files changed, 511 insertions, 497 deletions
diff --git a/drivers/ide/at91_ide.c b/drivers/ide/at91_ide.c index 6eabf9e31290..6be7d87382ab 100644 --- a/drivers/ide/at91_ide.c +++ b/drivers/ide/at91_ide.c | |||
@@ -185,55 +185,55 @@ static void ide_mm_outb(u8 value, unsigned long port) | |||
185 | writeb(value, (void __iomem *) port); | 185 | writeb(value, (void __iomem *) port); |
186 | } | 186 | } |
187 | 187 | ||
188 | static void at91_ide_tf_load(ide_drive_t *drive, ide_task_t *task) | 188 | static void at91_ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) |
189 | { | 189 | { |
190 | ide_hwif_t *hwif = drive->hwif; | 190 | ide_hwif_t *hwif = drive->hwif; |
191 | struct ide_io_ports *io_ports = &hwif->io_ports; | 191 | struct ide_io_ports *io_ports = &hwif->io_ports; |
192 | struct ide_taskfile *tf = &task->tf; | 192 | struct ide_taskfile *tf = &cmd->tf; |
193 | u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; | 193 | u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; |
194 | 194 | ||
195 | if (task->tf_flags & IDE_FTFLAG_FLAGGED) | 195 | if (cmd->tf_flags & IDE_FTFLAG_FLAGGED) |
196 | HIHI = 0xFF; | 196 | HIHI = 0xFF; |
197 | 197 | ||
198 | if (task->tf_flags & IDE_FTFLAG_OUT_DATA) { | 198 | if (cmd->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); |
202 | } | 202 | } |
203 | 203 | ||
204 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) | 204 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) |
205 | ide_mm_outb(tf->hob_feature, io_ports->feature_addr); | 205 | ide_mm_outb(tf->hob_feature, io_ports->feature_addr); |
206 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) | 206 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) |
207 | ide_mm_outb(tf->hob_nsect, io_ports->nsect_addr); | 207 | ide_mm_outb(tf->hob_nsect, io_ports->nsect_addr); |
208 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) | 208 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) |
209 | ide_mm_outb(tf->hob_lbal, io_ports->lbal_addr); | 209 | ide_mm_outb(tf->hob_lbal, io_ports->lbal_addr); |
210 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) | 210 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) |
211 | ide_mm_outb(tf->hob_lbam, io_ports->lbam_addr); | 211 | ide_mm_outb(tf->hob_lbam, io_ports->lbam_addr); |
212 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) | 212 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) |
213 | ide_mm_outb(tf->hob_lbah, io_ports->lbah_addr); | 213 | ide_mm_outb(tf->hob_lbah, io_ports->lbah_addr); |
214 | 214 | ||
215 | if (task->tf_flags & IDE_TFLAG_OUT_FEATURE) | 215 | if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE) |
216 | ide_mm_outb(tf->feature, io_ports->feature_addr); | 216 | ide_mm_outb(tf->feature, io_ports->feature_addr); |
217 | if (task->tf_flags & IDE_TFLAG_OUT_NSECT) | 217 | if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT) |
218 | ide_mm_outb(tf->nsect, io_ports->nsect_addr); | 218 | ide_mm_outb(tf->nsect, io_ports->nsect_addr); |
219 | if (task->tf_flags & IDE_TFLAG_OUT_LBAL) | 219 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL) |
220 | ide_mm_outb(tf->lbal, io_ports->lbal_addr); | 220 | ide_mm_outb(tf->lbal, io_ports->lbal_addr); |
221 | if (task->tf_flags & IDE_TFLAG_OUT_LBAM) | 221 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM) |
222 | ide_mm_outb(tf->lbam, io_ports->lbam_addr); | 222 | ide_mm_outb(tf->lbam, io_ports->lbam_addr); |
223 | if (task->tf_flags & IDE_TFLAG_OUT_LBAH) | 223 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH) |
224 | ide_mm_outb(tf->lbah, io_ports->lbah_addr); | 224 | ide_mm_outb(tf->lbah, io_ports->lbah_addr); |
225 | 225 | ||
226 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) | 226 | if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE) |
227 | ide_mm_outb((tf->device & HIHI) | drive->select, io_ports->device_addr); | 227 | ide_mm_outb((tf->device & HIHI) | drive->select, io_ports->device_addr); |
228 | } | 228 | } |
229 | 229 | ||
230 | static void at91_ide_tf_read(ide_drive_t *drive, ide_task_t *task) | 230 | static void at91_ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd) |
231 | { | 231 | { |
232 | ide_hwif_t *hwif = drive->hwif; | 232 | ide_hwif_t *hwif = drive->hwif; |
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 = &cmd->tf; |
235 | 235 | ||
236 | if (task->tf_flags & IDE_FTFLAG_IN_DATA) { | 236 | if (cmd->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); |
@@ -244,31 +244,31 @@ static void at91_ide_tf_read(ide_drive_t *drive, ide_task_t *task) | |||
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 & ~0x80, io_ports->ctl_addr); | 245 | ide_mm_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); |
246 | 246 | ||
247 | if (task->tf_flags & IDE_TFLAG_IN_FEATURE) | 247 | if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) |
248 | tf->feature = ide_mm_inb(io_ports->feature_addr); | 248 | tf->feature = ide_mm_inb(io_ports->feature_addr); |
249 | if (task->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 (task->tf_flags & IDE_TFLAG_IN_LBAL) | 251 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) |
252 | tf->lbal = ide_mm_inb(io_ports->lbal_addr); | 252 | tf->lbal = ide_mm_inb(io_ports->lbal_addr); |
253 | if (task->tf_flags & IDE_TFLAG_IN_LBAM) | 253 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAM) |
254 | tf->lbam = ide_mm_inb(io_ports->lbam_addr); | 254 | tf->lbam = ide_mm_inb(io_ports->lbam_addr); |
255 | if (task->tf_flags & IDE_TFLAG_IN_LBAH) | 255 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAH) |
256 | tf->lbah = ide_mm_inb(io_ports->lbah_addr); | 256 | tf->lbah = ide_mm_inb(io_ports->lbah_addr); |
257 | if (task->tf_flags & IDE_TFLAG_IN_DEVICE) | 257 | if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE) |
258 | tf->device = ide_mm_inb(io_ports->device_addr); | 258 | tf->device = ide_mm_inb(io_ports->device_addr); |
259 | 259 | ||
260 | if (task->tf_flags & IDE_TFLAG_LBA48) { | 260 | if (cmd->tf_flags & IDE_TFLAG_LBA48) { |
261 | ide_mm_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); | 261 | ide_mm_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); |
262 | 262 | ||
263 | if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) | 263 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) |
264 | tf->hob_feature = ide_mm_inb(io_ports->feature_addr); | 264 | tf->hob_feature = ide_mm_inb(io_ports->feature_addr); |
265 | if (task->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 (task->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 (task->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 (task->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 | } |
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index 5b704f1ea90c..12f436951bff 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c | |||
@@ -304,7 +304,7 @@ static int do_drive_set_taskfiles(ide_drive_t *drive, | |||
304 | /* send all taskfile registers (0x1f1-0x1f7) *in*that*order* */ | 304 | /* send all taskfile registers (0x1f1-0x1f7) *in*that*order* */ |
305 | for (ix = 0; ix < gtf_count; ix++) { | 305 | for (ix = 0; ix < gtf_count; ix++) { |
306 | u8 *gtf = (u8 *)(gtf_address + ix * REGS_PER_GTF); | 306 | u8 *gtf = (u8 *)(gtf_address + ix * REGS_PER_GTF); |
307 | ide_task_t task; | 307 | struct ide_cmd cmd; |
308 | 308 | ||
309 | DEBPRINT("(0x1f1-1f7): " | 309 | DEBPRINT("(0x1f1-1f7): " |
310 | "hex: %02x %02x %02x %02x %02x %02x %02x\n", | 310 | "hex: %02x %02x %02x %02x %02x %02x %02x\n", |
@@ -317,11 +317,11 @@ static int do_drive_set_taskfiles(ide_drive_t *drive, | |||
317 | } | 317 | } |
318 | 318 | ||
319 | /* convert GTF to taskfile */ | 319 | /* convert GTF to taskfile */ |
320 | memset(&task, 0, sizeof(ide_task_t)); | 320 | memset(&cmd, 0, sizeof(cmd)); |
321 | memcpy(&task.tf_array[7], gtf, REGS_PER_GTF); | 321 | memcpy(&cmd.tf_array[7], gtf, REGS_PER_GTF); |
322 | task.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 322 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; |
323 | 323 | ||
324 | err = ide_no_data_taskfile(drive, &task); | 324 | err = ide_no_data_taskfile(drive, &cmd); |
325 | if (err) { | 325 | if (err) { |
326 | printk(KERN_ERR "%s: ide_no_data_taskfile failed: %u\n", | 326 | printk(KERN_ERR "%s: ide_no_data_taskfile failed: %u\n", |
327 | __func__, err); | 327 | __func__, err); |
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index 2b9ac2106674..92c6ef6feb57 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -302,16 +302,16 @@ EXPORT_SYMBOL_GPL(ide_cd_get_xferlen); | |||
302 | 302 | ||
303 | void ide_read_bcount_and_ireason(ide_drive_t *drive, u16 *bcount, u8 *ireason) | 303 | void ide_read_bcount_and_ireason(ide_drive_t *drive, u16 *bcount, u8 *ireason) |
304 | { | 304 | { |
305 | ide_task_t task; | 305 | struct ide_cmd cmd; |
306 | 306 | ||
307 | memset(&task, 0, sizeof(task)); | 307 | memset(&cmd, 0, sizeof(cmd)); |
308 | task.tf_flags = IDE_TFLAG_IN_LBAH | IDE_TFLAG_IN_LBAM | | 308 | cmd.tf_flags = IDE_TFLAG_IN_LBAH | IDE_TFLAG_IN_LBAM | |
309 | IDE_TFLAG_IN_NSECT; | 309 | IDE_TFLAG_IN_NSECT; |
310 | 310 | ||
311 | drive->hwif->tp_ops->tf_read(drive, &task); | 311 | drive->hwif->tp_ops->tf_read(drive, &cmd); |
312 | 312 | ||
313 | *bcount = (task.tf.lbah << 8) | task.tf.lbam; | 313 | *bcount = (cmd.tf.lbah << 8) | cmd.tf.lbam; |
314 | *ireason = task.tf.nsect & 3; | 314 | *ireason = cmd.tf.nsect & 3; |
315 | } | 315 | } |
316 | EXPORT_SYMBOL_GPL(ide_read_bcount_and_ireason); | 316 | EXPORT_SYMBOL_GPL(ide_read_bcount_and_ireason); |
317 | 317 | ||
@@ -482,32 +482,32 @@ next_irq: | |||
482 | static void ide_pktcmd_tf_load(ide_drive_t *drive, u32 tf_flags, u16 bcount) | 482 | static void ide_pktcmd_tf_load(ide_drive_t *drive, u32 tf_flags, u16 bcount) |
483 | { | 483 | { |
484 | ide_hwif_t *hwif = drive->hwif; | 484 | ide_hwif_t *hwif = drive->hwif; |
485 | ide_task_t task; | 485 | struct ide_cmd cmd; |
486 | u8 dma = drive->dma; | 486 | u8 dma = drive->dma; |
487 | 487 | ||
488 | memset(&task, 0, sizeof(task)); | 488 | memset(&cmd, 0, sizeof(cmd)); |
489 | task.tf_flags = IDE_TFLAG_OUT_LBAH | IDE_TFLAG_OUT_LBAM | | 489 | cmd.tf_flags = IDE_TFLAG_OUT_LBAH | IDE_TFLAG_OUT_LBAM | |
490 | IDE_TFLAG_OUT_FEATURE | tf_flags; | 490 | IDE_TFLAG_OUT_FEATURE | tf_flags; |
491 | task.tf.feature = dma; /* Use PIO/DMA */ | 491 | cmd.tf.feature = dma; /* Use PIO/DMA */ |
492 | task.tf.lbam = bcount & 0xff; | 492 | cmd.tf.lbam = bcount & 0xff; |
493 | task.tf.lbah = (bcount >> 8) & 0xff; | 493 | cmd.tf.lbah = (bcount >> 8) & 0xff; |
494 | 494 | ||
495 | ide_tf_dump(drive->name, &task.tf); | 495 | ide_tf_dump(drive->name, &cmd.tf); |
496 | hwif->tp_ops->set_irq(hwif, 1); | 496 | hwif->tp_ops->set_irq(hwif, 1); |
497 | SELECT_MASK(drive, 0); | 497 | SELECT_MASK(drive, 0); |
498 | hwif->tp_ops->tf_load(drive, &task); | 498 | hwif->tp_ops->tf_load(drive, &cmd); |
499 | } | 499 | } |
500 | 500 | ||
501 | static u8 ide_read_ireason(ide_drive_t *drive) | 501 | static u8 ide_read_ireason(ide_drive_t *drive) |
502 | { | 502 | { |
503 | ide_task_t task; | 503 | struct ide_cmd cmd; |
504 | 504 | ||
505 | memset(&task, 0, sizeof(task)); | 505 | memset(&cmd, 0, sizeof(cmd)); |
506 | task.tf_flags = IDE_TFLAG_IN_NSECT; | 506 | cmd.tf_flags = IDE_TFLAG_IN_NSECT; |
507 | 507 | ||
508 | drive->hwif->tp_ops->tf_read(drive, &task); | 508 | drive->hwif->tp_ops->tf_read(drive, &cmd); |
509 | 509 | ||
510 | return task.tf.nsect & 3; | 510 | return cmd.tf.nsect & 3; |
511 | } | 511 | } |
512 | 512 | ||
513 | static u8 ide_wait_ireason(ide_drive_t *drive, u8 ireason) | 513 | static u8 ide_wait_ireason(ide_drive_t *drive, u8 ireason) |
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 912be155a8c1..6647cb8bd910 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -62,24 +62,24 @@ static const u8 ide_data_phases[] = { | |||
62 | TASKFILE_OUT_DMA, | 62 | TASKFILE_OUT_DMA, |
63 | }; | 63 | }; |
64 | 64 | ||
65 | static void ide_tf_set_cmd(ide_drive_t *drive, ide_task_t *task, u8 dma) | 65 | static void ide_tf_set_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 dma) |
66 | { | 66 | { |
67 | u8 index, lba48, write; | 67 | u8 index, lba48, write; |
68 | 68 | ||
69 | lba48 = (task->tf_flags & IDE_TFLAG_LBA48) ? 2 : 0; | 69 | lba48 = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 2 : 0; |
70 | write = (task->tf_flags & IDE_TFLAG_WRITE) ? 1 : 0; | 70 | write = (cmd->tf_flags & IDE_TFLAG_WRITE) ? 1 : 0; |
71 | 71 | ||
72 | if (dma) | 72 | if (dma) |
73 | index = 8; | 73 | index = 8; |
74 | else | 74 | else |
75 | index = drive->mult_count ? 0 : 4; | 75 | index = drive->mult_count ? 0 : 4; |
76 | 76 | ||
77 | task->tf.command = ide_rw_cmds[index + lba48 + write]; | 77 | cmd->tf.command = ide_rw_cmds[index + lba48 + write]; |
78 | 78 | ||
79 | if (dma) | 79 | if (dma) |
80 | index = 8; /* fixup index */ | 80 | index = 8; /* fixup index */ |
81 | 81 | ||
82 | task->data_phase = ide_data_phases[index / 2 + write]; | 82 | cmd->data_phase = ide_data_phases[index / 2 + write]; |
83 | } | 83 | } |
84 | 84 | ||
85 | /* | 85 | /* |
@@ -93,8 +93,8 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, | |||
93 | u16 nsectors = (u16)rq->nr_sectors; | 93 | u16 nsectors = (u16)rq->nr_sectors; |
94 | u8 lba48 = !!(drive->dev_flags & IDE_DFLAG_LBA48); | 94 | u8 lba48 = !!(drive->dev_flags & IDE_DFLAG_LBA48); |
95 | u8 dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA); | 95 | u8 dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA); |
96 | ide_task_t task; | 96 | struct ide_cmd cmd; |
97 | struct ide_taskfile *tf = &task.tf; | 97 | struct ide_taskfile *tf = &cmd.tf; |
98 | ide_startstop_t rc; | 98 | ide_startstop_t rc; |
99 | 99 | ||
100 | if ((hwif->host_flags & IDE_HFLAG_NO_LBA48_DMA) && lba48 && dma) { | 100 | if ((hwif->host_flags & IDE_HFLAG_NO_LBA48_DMA) && lba48 && dma) { |
@@ -109,8 +109,8 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, | |||
109 | ide_map_sg(drive, rq); | 109 | ide_map_sg(drive, rq); |
110 | } | 110 | } |
111 | 111 | ||
112 | memset(&task, 0, sizeof(task)); | 112 | memset(&cmd, 0, sizeof(cmd)); |
113 | task.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 113 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; |
114 | 114 | ||
115 | if (drive->dev_flags & IDE_DFLAG_LBA) { | 115 | if (drive->dev_flags & IDE_DFLAG_LBA) { |
116 | if (lba48) { | 116 | if (lba48) { |
@@ -129,7 +129,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, | |||
129 | tf->lbam = (u8)(block >> 8); | 129 | tf->lbam = (u8)(block >> 8); |
130 | tf->lbah = (u8)(block >> 16); | 130 | tf->lbah = (u8)(block >> 16); |
131 | 131 | ||
132 | task.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB); | 132 | cmd.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB); |
133 | } else { | 133 | } else { |
134 | tf->nsect = nsectors & 0xff; | 134 | tf->nsect = nsectors & 0xff; |
135 | tf->lbal = block; | 135 | tf->lbal = block; |
@@ -157,19 +157,19 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, | |||
157 | } | 157 | } |
158 | 158 | ||
159 | if (rq_data_dir(rq)) | 159 | if (rq_data_dir(rq)) |
160 | task.tf_flags |= IDE_TFLAG_WRITE; | 160 | cmd.tf_flags |= IDE_TFLAG_WRITE; |
161 | 161 | ||
162 | ide_tf_set_cmd(drive, &task, dma); | 162 | ide_tf_set_cmd(drive, &cmd, dma); |
163 | task.rq = rq; | 163 | cmd.rq = rq; |
164 | 164 | ||
165 | rc = do_rw_taskfile(drive, &task); | 165 | rc = do_rw_taskfile(drive, &cmd); |
166 | 166 | ||
167 | if (rc == ide_stopped && dma) { | 167 | if (rc == ide_stopped && dma) { |
168 | /* fallback to PIO */ | 168 | /* fallback to PIO */ |
169 | task.tf_flags |= IDE_TFLAG_DMA_PIO_FALLBACK; | 169 | cmd.tf_flags |= IDE_TFLAG_DMA_PIO_FALLBACK; |
170 | ide_tf_set_cmd(drive, &task, 0); | 170 | ide_tf_set_cmd(drive, &cmd, 0); |
171 | ide_init_sg_cmd(drive, rq); | 171 | ide_init_sg_cmd(drive, rq); |
172 | rc = do_rw_taskfile(drive, &task); | 172 | rc = do_rw_taskfile(drive, &cmd); |
173 | } | 173 | } |
174 | 174 | ||
175 | return rc; | 175 | return rc; |
@@ -213,22 +213,22 @@ static ide_startstop_t ide_do_rw_disk(ide_drive_t *drive, struct request *rq, | |||
213 | */ | 213 | */ |
214 | static u64 idedisk_read_native_max_address(ide_drive_t *drive, int lba48) | 214 | static u64 idedisk_read_native_max_address(ide_drive_t *drive, int lba48) |
215 | { | 215 | { |
216 | ide_task_t args; | 216 | struct ide_cmd cmd; |
217 | struct ide_taskfile *tf = &args.tf; | 217 | struct ide_taskfile *tf = &cmd.tf; |
218 | u64 addr = 0; | 218 | u64 addr = 0; |
219 | 219 | ||
220 | /* Create IDE/ATA command request structure */ | 220 | memset(&cmd, 0, sizeof(cmd)); |
221 | memset(&args, 0, sizeof(ide_task_t)); | ||
222 | if (lba48) | 221 | if (lba48) |
223 | tf->command = ATA_CMD_READ_NATIVE_MAX_EXT; | 222 | tf->command = ATA_CMD_READ_NATIVE_MAX_EXT; |
224 | else | 223 | else |
225 | tf->command = ATA_CMD_READ_NATIVE_MAX; | 224 | tf->command = ATA_CMD_READ_NATIVE_MAX; |
226 | tf->device = ATA_LBA; | 225 | tf->device = ATA_LBA; |
227 | args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 226 | |
227 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | ||
228 | if (lba48) | 228 | if (lba48) |
229 | args.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB); | 229 | cmd.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB); |
230 | /* submit command request */ | 230 | |
231 | ide_no_data_taskfile(drive, &args); | 231 | ide_no_data_taskfile(drive, &cmd); |
232 | 232 | ||
233 | /* if OK, compute maximum address value */ | 233 | /* if OK, compute maximum address value */ |
234 | if ((tf->status & 0x01) == 0) | 234 | if ((tf->status & 0x01) == 0) |
@@ -243,13 +243,13 @@ static u64 idedisk_read_native_max_address(ide_drive_t *drive, int lba48) | |||
243 | */ | 243 | */ |
244 | static u64 idedisk_set_max_address(ide_drive_t *drive, u64 addr_req, int lba48) | 244 | static u64 idedisk_set_max_address(ide_drive_t *drive, u64 addr_req, int lba48) |
245 | { | 245 | { |
246 | ide_task_t args; | 246 | struct ide_cmd cmd; |
247 | struct ide_taskfile *tf = &args.tf; | 247 | struct ide_taskfile *tf = &cmd.tf; |
248 | u64 addr_set = 0; | 248 | u64 addr_set = 0; |
249 | 249 | ||
250 | addr_req--; | 250 | addr_req--; |
251 | /* Create IDE/ATA command request structure */ | 251 | |
252 | memset(&args, 0, sizeof(ide_task_t)); | 252 | memset(&cmd, 0, sizeof(cmd)); |
253 | tf->lbal = (addr_req >> 0) & 0xff; | 253 | tf->lbal = (addr_req >> 0) & 0xff; |
254 | tf->lbam = (addr_req >>= 8) & 0xff; | 254 | tf->lbam = (addr_req >>= 8) & 0xff; |
255 | tf->lbah = (addr_req >>= 8) & 0xff; | 255 | tf->lbah = (addr_req >>= 8) & 0xff; |
@@ -263,11 +263,13 @@ static u64 idedisk_set_max_address(ide_drive_t *drive, u64 addr_req, int lba48) | |||
263 | tf->command = ATA_CMD_SET_MAX; | 263 | tf->command = ATA_CMD_SET_MAX; |
264 | } | 264 | } |
265 | tf->device |= ATA_LBA; | 265 | tf->device |= ATA_LBA; |
266 | args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 266 | |
267 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | ||
267 | if (lba48) | 268 | if (lba48) |
268 | args.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB); | 269 | cmd.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB); |
269 | /* submit command request */ | 270 | |
270 | ide_no_data_taskfile(drive, &args); | 271 | ide_no_data_taskfile(drive, &cmd); |
272 | |||
271 | /* if OK, compute maximum address value */ | 273 | /* if OK, compute maximum address value */ |
272 | if ((tf->status & 0x01) == 0) | 274 | if ((tf->status & 0x01) == 0) |
273 | addr_set = ide_get_lba_addr(tf, lba48) + 1; | 275 | addr_set = ide_get_lba_addr(tf, lba48) + 1; |
@@ -386,24 +388,24 @@ static int ide_disk_get_capacity(ide_drive_t *drive) | |||
386 | static void idedisk_prepare_flush(struct request_queue *q, struct request *rq) | 388 | static void idedisk_prepare_flush(struct request_queue *q, struct request *rq) |
387 | { | 389 | { |
388 | ide_drive_t *drive = q->queuedata; | 390 | ide_drive_t *drive = q->queuedata; |
389 | ide_task_t *task = kmalloc(sizeof(*task), GFP_ATOMIC); | 391 | struct ide_cmd *cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC); |
390 | 392 | ||
391 | /* FIXME: map struct ide_taskfile on rq->cmd[] */ | 393 | /* FIXME: map struct ide_taskfile on rq->cmd[] */ |
392 | BUG_ON(task == NULL); | 394 | BUG_ON(cmd == NULL); |
393 | 395 | ||
394 | memset(task, 0, sizeof(*task)); | 396 | memset(cmd, 0, sizeof(*cmd)); |
395 | if (ata_id_flush_ext_enabled(drive->id) && | 397 | if (ata_id_flush_ext_enabled(drive->id) && |
396 | (drive->capacity64 >= (1UL << 28))) | 398 | (drive->capacity64 >= (1UL << 28))) |
397 | task->tf.command = ATA_CMD_FLUSH_EXT; | 399 | cmd->tf.command = ATA_CMD_FLUSH_EXT; |
398 | else | 400 | else |
399 | task->tf.command = ATA_CMD_FLUSH; | 401 | cmd->tf.command = ATA_CMD_FLUSH; |
400 | task->tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE | | 402 | cmd->tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE | |
401 | IDE_TFLAG_DYN; | 403 | IDE_TFLAG_DYN; |
402 | task->data_phase = TASKFILE_NO_DATA; | 404 | cmd->data_phase = TASKFILE_NO_DATA; |
403 | 405 | ||
404 | rq->cmd_type = REQ_TYPE_ATA_TASKFILE; | 406 | rq->cmd_type = REQ_TYPE_ATA_TASKFILE; |
405 | rq->cmd_flags |= REQ_SOFTBARRIER; | 407 | rq->cmd_flags |= REQ_SOFTBARRIER; |
406 | rq->special = task; | 408 | rq->special = cmd; |
407 | } | 409 | } |
408 | 410 | ||
409 | ide_devset_get(multcount, mult_count); | 411 | ide_devset_get(multcount, mult_count); |
@@ -453,15 +455,15 @@ static int set_nowerr(ide_drive_t *drive, int arg) | |||
453 | 455 | ||
454 | static int ide_do_setfeature(ide_drive_t *drive, u8 feature, u8 nsect) | 456 | static int ide_do_setfeature(ide_drive_t *drive, u8 feature, u8 nsect) |
455 | { | 457 | { |
456 | ide_task_t task; | 458 | struct ide_cmd cmd; |
457 | 459 | ||
458 | memset(&task, 0, sizeof(task)); | 460 | memset(&cmd, 0, sizeof(cmd)); |
459 | task.tf.feature = feature; | 461 | cmd.tf.feature = feature; |
460 | task.tf.nsect = nsect; | 462 | cmd.tf.nsect = nsect; |
461 | task.tf.command = ATA_CMD_SET_FEATURES; | 463 | cmd.tf.command = ATA_CMD_SET_FEATURES; |
462 | task.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 464 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; |
463 | 465 | ||
464 | return ide_no_data_taskfile(drive, &task); | 466 | return ide_no_data_taskfile(drive, &cmd); |
465 | } | 467 | } |
466 | 468 | ||
467 | static void update_ordered(ide_drive_t *drive) | 469 | static void update_ordered(ide_drive_t *drive) |
@@ -528,15 +530,16 @@ static int set_wcache(ide_drive_t *drive, int arg) | |||
528 | 530 | ||
529 | static int do_idedisk_flushcache(ide_drive_t *drive) | 531 | static int do_idedisk_flushcache(ide_drive_t *drive) |
530 | { | 532 | { |
531 | ide_task_t args; | 533 | struct ide_cmd cmd; |
532 | 534 | ||
533 | memset(&args, 0, sizeof(ide_task_t)); | 535 | memset(&cmd, 0, sizeof(cmd)); |
534 | if (ata_id_flush_ext_enabled(drive->id)) | 536 | if (ata_id_flush_ext_enabled(drive->id)) |
535 | args.tf.command = ATA_CMD_FLUSH_EXT; | 537 | cmd.tf.command = ATA_CMD_FLUSH_EXT; |
536 | else | 538 | else |
537 | args.tf.command = ATA_CMD_FLUSH; | 539 | cmd.tf.command = ATA_CMD_FLUSH; |
538 | args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 540 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; |
539 | return ide_no_data_taskfile(drive, &args); | 541 | |
542 | return ide_no_data_taskfile(drive, &cmd); | ||
540 | } | 543 | } |
541 | 544 | ||
542 | ide_devset_get(acoustic, acoustic); | 545 | ide_devset_get(acoustic, acoustic); |
@@ -708,17 +711,17 @@ static int ide_disk_init_media(ide_drive_t *drive, struct gendisk *disk) | |||
708 | static int ide_disk_set_doorlock(ide_drive_t *drive, struct gendisk *disk, | 711 | static int ide_disk_set_doorlock(ide_drive_t *drive, struct gendisk *disk, |
709 | int on) | 712 | int on) |
710 | { | 713 | { |
711 | ide_task_t task; | 714 | struct ide_cmd cmd; |
712 | int ret; | 715 | int ret; |
713 | 716 | ||
714 | if ((drive->dev_flags & IDE_DFLAG_DOORLOCKING) == 0) | 717 | if ((drive->dev_flags & IDE_DFLAG_DOORLOCKING) == 0) |
715 | return 0; | 718 | return 0; |
716 | 719 | ||
717 | memset(&task, 0, sizeof(task)); | 720 | memset(&cmd, 0, sizeof(cmd)); |
718 | task.tf.command = on ? ATA_CMD_MEDIA_LOCK : ATA_CMD_MEDIA_UNLOCK; | 721 | cmd.tf.command = on ? ATA_CMD_MEDIA_LOCK : ATA_CMD_MEDIA_UNLOCK; |
719 | task.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 722 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; |
720 | 723 | ||
721 | ret = ide_no_data_taskfile(drive, &task); | 724 | ret = ide_no_data_taskfile(drive, &cmd); |
722 | 725 | ||
723 | if (ret) | 726 | if (ret) |
724 | drive->dev_flags &= ~IDE_DFLAG_DOORLOCKING; | 727 | drive->dev_flags &= ~IDE_DFLAG_DOORLOCKING; |
diff --git a/drivers/ide/ide-disk_proc.c b/drivers/ide/ide-disk_proc.c index 5766c1f62ad2..afe4f47e9e19 100644 --- a/drivers/ide/ide-disk_proc.c +++ b/drivers/ide/ide-disk_proc.c | |||
@@ -6,33 +6,34 @@ | |||
6 | 6 | ||
7 | static int smart_enable(ide_drive_t *drive) | 7 | static int smart_enable(ide_drive_t *drive) |
8 | { | 8 | { |
9 | ide_task_t args; | 9 | struct ide_cmd cmd; |
10 | struct ide_taskfile *tf = &args.tf; | 10 | struct ide_taskfile *tf = &cmd.tf; |
11 | 11 | ||
12 | memset(&args, 0, sizeof(ide_task_t)); | 12 | memset(&cmd, 0, sizeof(cmd)); |
13 | tf->feature = ATA_SMART_ENABLE; | 13 | tf->feature = ATA_SMART_ENABLE; |
14 | tf->lbam = ATA_SMART_LBAM_PASS; | 14 | tf->lbam = ATA_SMART_LBAM_PASS; |
15 | tf->lbah = ATA_SMART_LBAH_PASS; | 15 | tf->lbah = ATA_SMART_LBAH_PASS; |
16 | tf->command = ATA_CMD_SMART; | 16 | tf->command = ATA_CMD_SMART; |
17 | args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 17 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; |
18 | return ide_no_data_taskfile(drive, &args); | 18 | |
19 | return ide_no_data_taskfile(drive, &cmd); | ||
19 | } | 20 | } |
20 | 21 | ||
21 | static int get_smart_data(ide_drive_t *drive, u8 *buf, u8 sub_cmd) | 22 | static int get_smart_data(ide_drive_t *drive, u8 *buf, u8 sub_cmd) |
22 | { | 23 | { |
23 | ide_task_t args; | 24 | struct ide_cmd cmd; |
24 | struct ide_taskfile *tf = &args.tf; | 25 | struct ide_taskfile *tf = &cmd.tf; |
25 | 26 | ||
26 | memset(&args, 0, sizeof(ide_task_t)); | 27 | memset(&cmd, 0, sizeof(cmd)); |
27 | tf->feature = sub_cmd; | 28 | tf->feature = sub_cmd; |
28 | tf->nsect = 0x01; | 29 | tf->nsect = 0x01; |
29 | tf->lbam = ATA_SMART_LBAM_PASS; | 30 | tf->lbam = ATA_SMART_LBAM_PASS; |
30 | tf->lbah = ATA_SMART_LBAH_PASS; | 31 | tf->lbah = ATA_SMART_LBAH_PASS; |
31 | tf->command = ATA_CMD_SMART; | 32 | tf->command = ATA_CMD_SMART; |
32 | args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 33 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; |
33 | args.data_phase = TASKFILE_IN; | 34 | cmd.data_phase = TASKFILE_IN; |
34 | 35 | ||
35 | return ide_raw_taskfile(drive, &args, buf, 1); | 36 | return ide_raw_taskfile(drive, &cmd, buf, 1); |
36 | } | 37 | } |
37 | 38 | ||
38 | static int proc_idedisk_read_cache | 39 | static int proc_idedisk_read_cache |
diff --git a/drivers/ide/ide-eh.c b/drivers/ide/ide-eh.c index e2c04886616f..f6e1a82a3cc5 100644 --- a/drivers/ide/ide-eh.c +++ b/drivers/ide/ide-eh.c | |||
@@ -125,10 +125,10 @@ ide_startstop_t ide_error(ide_drive_t *drive, const char *msg, u8 stat) | |||
125 | if (!blk_fs_request(rq)) { | 125 | if (!blk_fs_request(rq)) { |
126 | rq->errors = 1; | 126 | rq->errors = 1; |
127 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { | 127 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { |
128 | ide_task_t *task = rq->special; | 128 | struct ide_cmd *cmd = rq->special; |
129 | 129 | ||
130 | if (task) | 130 | if (cmd) |
131 | ide_complete_task(drive, task, stat, err); | 131 | ide_complete_cmd(drive, cmd, stat, err); |
132 | } else if (blk_pm_request(rq)) { | 132 | } else if (blk_pm_request(rq)) { |
133 | ide_complete_pm_rq(drive, rq); | 133 | ide_complete_pm_rq(drive, rq); |
134 | return ide_stopped; | 134 | return ide_stopped; |
diff --git a/drivers/ide/ide-h8300.c b/drivers/ide/ide-h8300.c index 11e937485bff..c7883f23c66a 100644 --- a/drivers/ide/ide-h8300.c +++ b/drivers/ide/ide-h8300.c | |||
@@ -44,53 +44,53 @@ static u16 mm_inw(unsigned long a) | |||
44 | return r; | 44 | return r; |
45 | } | 45 | } |
46 | 46 | ||
47 | static void h8300_tf_load(ide_drive_t *drive, ide_task_t *task) | 47 | static void h8300_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) |
48 | { | 48 | { |
49 | ide_hwif_t *hwif = drive->hwif; | 49 | ide_hwif_t *hwif = drive->hwif; |
50 | struct ide_io_ports *io_ports = &hwif->io_ports; | 50 | struct ide_io_ports *io_ports = &hwif->io_ports; |
51 | struct ide_taskfile *tf = &task->tf; | 51 | struct ide_taskfile *tf = &cmd->tf; |
52 | u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; | 52 | u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; |
53 | 53 | ||
54 | if (task->ftf_flags & IDE_FTFLAG_FLAGGED) | 54 | if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED) |
55 | HIHI = 0xFF; | 55 | HIHI = 0xFF; |
56 | 56 | ||
57 | if (task->ftf_flags & IDE_FTFLAG_OUT_DATA) | 57 | if (cmd->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 (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) |
61 | outb(tf->hob_feature, io_ports->feature_addr); | 61 | outb(tf->hob_feature, io_ports->feature_addr); |
62 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) | 62 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) |
63 | outb(tf->hob_nsect, io_ports->nsect_addr); | 63 | outb(tf->hob_nsect, io_ports->nsect_addr); |
64 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) | 64 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) |
65 | outb(tf->hob_lbal, io_ports->lbal_addr); | 65 | outb(tf->hob_lbal, io_ports->lbal_addr); |
66 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) | 66 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) |
67 | outb(tf->hob_lbam, io_ports->lbam_addr); | 67 | outb(tf->hob_lbam, io_ports->lbam_addr); |
68 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) | 68 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) |
69 | outb(tf->hob_lbah, io_ports->lbah_addr); | 69 | outb(tf->hob_lbah, io_ports->lbah_addr); |
70 | 70 | ||
71 | if (task->tf_flags & IDE_TFLAG_OUT_FEATURE) | 71 | if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE) |
72 | outb(tf->feature, io_ports->feature_addr); | 72 | outb(tf->feature, io_ports->feature_addr); |
73 | if (task->tf_flags & IDE_TFLAG_OUT_NSECT) | 73 | if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT) |
74 | outb(tf->nsect, io_ports->nsect_addr); | 74 | outb(tf->nsect, io_ports->nsect_addr); |
75 | if (task->tf_flags & IDE_TFLAG_OUT_LBAL) | 75 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL) |
76 | outb(tf->lbal, io_ports->lbal_addr); | 76 | outb(tf->lbal, io_ports->lbal_addr); |
77 | if (task->tf_flags & IDE_TFLAG_OUT_LBAM) | 77 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM) |
78 | outb(tf->lbam, io_ports->lbam_addr); | 78 | outb(tf->lbam, io_ports->lbam_addr); |
79 | if (task->tf_flags & IDE_TFLAG_OUT_LBAH) | 79 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH) |
80 | outb(tf->lbah, io_ports->lbah_addr); | 80 | outb(tf->lbah, io_ports->lbah_addr); |
81 | 81 | ||
82 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) | 82 | if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE) |
83 | outb((tf->device & HIHI) | drive->select, | 83 | outb((tf->device & HIHI) | drive->select, |
84 | io_ports->device_addr); | 84 | io_ports->device_addr); |
85 | } | 85 | } |
86 | 86 | ||
87 | static void h8300_tf_read(ide_drive_t *drive, ide_task_t *task) | 87 | static void h8300_tf_read(ide_drive_t *drive, struct ide_cmd *cmd) |
88 | { | 88 | { |
89 | ide_hwif_t *hwif = drive->hwif; | 89 | ide_hwif_t *hwif = drive->hwif; |
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 = &cmd->tf; |
92 | 92 | ||
93 | if (task->ftf_flags & IDE_FTFLAG_IN_DATA) { | 93 | if (cmd->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; |
@@ -100,31 +100,31 @@ static void h8300_tf_read(ide_drive_t *drive, ide_task_t *task) | |||
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 & ~0x80, io_ports->ctl_addr); | 101 | outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); |
102 | 102 | ||
103 | if (task->tf_flags & IDE_TFLAG_IN_FEATURE) | 103 | if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) |
104 | tf->feature = inb(io_ports->feature_addr); | 104 | tf->feature = inb(io_ports->feature_addr); |
105 | if (task->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 (task->tf_flags & IDE_TFLAG_IN_LBAL) | 107 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) |
108 | tf->lbal = inb(io_ports->lbal_addr); | 108 | tf->lbal = inb(io_ports->lbal_addr); |
109 | if (task->tf_flags & IDE_TFLAG_IN_LBAM) | 109 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAM) |
110 | tf->lbam = inb(io_ports->lbam_addr); | 110 | tf->lbam = inb(io_ports->lbam_addr); |
111 | if (task->tf_flags & IDE_TFLAG_IN_LBAH) | 111 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAH) |
112 | tf->lbah = inb(io_ports->lbah_addr); | 112 | tf->lbah = inb(io_ports->lbah_addr); |
113 | if (task->tf_flags & IDE_TFLAG_IN_DEVICE) | 113 | if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE) |
114 | tf->device = inb(io_ports->device_addr); | 114 | tf->device = inb(io_ports->device_addr); |
115 | 115 | ||
116 | if (task->tf_flags & IDE_TFLAG_LBA48) { | 116 | if (cmd->tf_flags & IDE_TFLAG_LBA48) { |
117 | outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); | 117 | outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); |
118 | 118 | ||
119 | if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) | 119 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) |
120 | tf->hob_feature = inb(io_ports->feature_addr); | 120 | tf->hob_feature = inb(io_ports->feature_addr); |
121 | if (task->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 (task->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 (task->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 (task->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 | } |
diff --git a/drivers/ide/ide-io-std.c b/drivers/ide/ide-io-std.c index cad59f0bfbce..570c0cc4514d 100644 --- a/drivers/ide/ide-io-std.c +++ b/drivers/ide/ide-io-std.c | |||
@@ -82,24 +82,24 @@ void ide_set_irq(ide_hwif_t *hwif, int on) | |||
82 | } | 82 | } |
83 | EXPORT_SYMBOL_GPL(ide_set_irq); | 83 | EXPORT_SYMBOL_GPL(ide_set_irq); |
84 | 84 | ||
85 | void ide_tf_load(ide_drive_t *drive, ide_task_t *task) | 85 | void ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) |
86 | { | 86 | { |
87 | ide_hwif_t *hwif = drive->hwif; | 87 | ide_hwif_t *hwif = drive->hwif; |
88 | struct ide_io_ports *io_ports = &hwif->io_ports; | 88 | struct ide_io_ports *io_ports = &hwif->io_ports; |
89 | struct ide_taskfile *tf = &task->tf; | 89 | struct ide_taskfile *tf = &cmd->tf; |
90 | void (*tf_outb)(u8 addr, unsigned long port); | 90 | void (*tf_outb)(u8 addr, unsigned long port); |
91 | u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0; | 91 | u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0; |
92 | u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; | 92 | u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; |
93 | 93 | ||
94 | if (mmio) | 94 | if (mmio) |
95 | tf_outb = ide_mm_outb; | 95 | tf_outb = ide_mm_outb; |
96 | else | 96 | else |
97 | tf_outb = ide_outb; | 97 | tf_outb = ide_outb; |
98 | 98 | ||
99 | if (task->ftf_flags & IDE_FTFLAG_FLAGGED) | 99 | if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED) |
100 | HIHI = 0xFF; | 100 | HIHI = 0xFF; |
101 | 101 | ||
102 | if (task->ftf_flags & IDE_FTFLAG_OUT_DATA) { | 102 | if (cmd->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) |
@@ -108,39 +108,39 @@ void ide_tf_load(ide_drive_t *drive, ide_task_t *task) | |||
108 | outw(data, io_ports->data_addr); | 108 | outw(data, io_ports->data_addr); |
109 | } | 109 | } |
110 | 110 | ||
111 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) | 111 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) |
112 | tf_outb(tf->hob_feature, io_ports->feature_addr); | 112 | tf_outb(tf->hob_feature, io_ports->feature_addr); |
113 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) | 113 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) |
114 | tf_outb(tf->hob_nsect, io_ports->nsect_addr); | 114 | tf_outb(tf->hob_nsect, io_ports->nsect_addr); |
115 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) | 115 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) |
116 | tf_outb(tf->hob_lbal, io_ports->lbal_addr); | 116 | tf_outb(tf->hob_lbal, io_ports->lbal_addr); |
117 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) | 117 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) |
118 | tf_outb(tf->hob_lbam, io_ports->lbam_addr); | 118 | tf_outb(tf->hob_lbam, io_ports->lbam_addr); |
119 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) | 119 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) |
120 | tf_outb(tf->hob_lbah, io_ports->lbah_addr); | 120 | tf_outb(tf->hob_lbah, io_ports->lbah_addr); |
121 | 121 | ||
122 | if (task->tf_flags & IDE_TFLAG_OUT_FEATURE) | 122 | if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE) |
123 | tf_outb(tf->feature, io_ports->feature_addr); | 123 | tf_outb(tf->feature, io_ports->feature_addr); |
124 | if (task->tf_flags & IDE_TFLAG_OUT_NSECT) | 124 | if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT) |
125 | tf_outb(tf->nsect, io_ports->nsect_addr); | 125 | tf_outb(tf->nsect, io_ports->nsect_addr); |
126 | if (task->tf_flags & IDE_TFLAG_OUT_LBAL) | 126 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL) |
127 | tf_outb(tf->lbal, io_ports->lbal_addr); | 127 | tf_outb(tf->lbal, io_ports->lbal_addr); |
128 | if (task->tf_flags & IDE_TFLAG_OUT_LBAM) | 128 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM) |
129 | tf_outb(tf->lbam, io_ports->lbam_addr); | 129 | tf_outb(tf->lbam, io_ports->lbam_addr); |
130 | if (task->tf_flags & IDE_TFLAG_OUT_LBAH) | 130 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH) |
131 | tf_outb(tf->lbah, io_ports->lbah_addr); | 131 | tf_outb(tf->lbah, io_ports->lbah_addr); |
132 | 132 | ||
133 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) | 133 | if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE) |
134 | tf_outb((tf->device & HIHI) | drive->select, | 134 | tf_outb((tf->device & HIHI) | drive->select, |
135 | io_ports->device_addr); | 135 | io_ports->device_addr); |
136 | } | 136 | } |
137 | EXPORT_SYMBOL_GPL(ide_tf_load); | 137 | EXPORT_SYMBOL_GPL(ide_tf_load); |
138 | 138 | ||
139 | void ide_tf_read(ide_drive_t *drive, ide_task_t *task) | 139 | void ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd) |
140 | { | 140 | { |
141 | ide_hwif_t *hwif = drive->hwif; | 141 | ide_hwif_t *hwif = drive->hwif; |
142 | struct ide_io_ports *io_ports = &hwif->io_ports; | 142 | struct ide_io_ports *io_ports = &hwif->io_ports; |
143 | struct ide_taskfile *tf = &task->tf; | 143 | struct ide_taskfile *tf = &cmd->tf; |
144 | void (*tf_outb)(u8 addr, unsigned long port); | 144 | void (*tf_outb)(u8 addr, unsigned long port); |
145 | u8 (*tf_inb)(unsigned long port); | 145 | u8 (*tf_inb)(unsigned long port); |
146 | u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0; | 146 | u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0; |
@@ -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->ftf_flags & IDE_FTFLAG_IN_DATA) { | 156 | if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) { |
157 | u16 data; | 157 | u16 data; |
158 | 158 | ||
159 | if (mmio) | 159 | if (mmio) |
@@ -168,31 +168,31 @@ void ide_tf_read(ide_drive_t *drive, ide_task_t *task) | |||
168 | /* be sure we're looking at the low order bits */ | 168 | /* be sure we're looking at the low order bits */ |
169 | tf_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); | 169 | tf_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); |
170 | 170 | ||
171 | if (task->tf_flags & IDE_TFLAG_IN_FEATURE) | 171 | if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) |
172 | tf->feature = tf_inb(io_ports->feature_addr); | 172 | tf->feature = tf_inb(io_ports->feature_addr); |
173 | if (task->tf_flags & IDE_TFLAG_IN_NSECT) | 173 | if (cmd->tf_flags & IDE_TFLAG_IN_NSECT) |
174 | tf->nsect = tf_inb(io_ports->nsect_addr); | 174 | tf->nsect = tf_inb(io_ports->nsect_addr); |
175 | if (task->tf_flags & IDE_TFLAG_IN_LBAL) | 175 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) |
176 | tf->lbal = tf_inb(io_ports->lbal_addr); | 176 | tf->lbal = tf_inb(io_ports->lbal_addr); |
177 | if (task->tf_flags & IDE_TFLAG_IN_LBAM) | 177 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAM) |
178 | tf->lbam = tf_inb(io_ports->lbam_addr); | 178 | tf->lbam = tf_inb(io_ports->lbam_addr); |
179 | if (task->tf_flags & IDE_TFLAG_IN_LBAH) | 179 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAH) |
180 | tf->lbah = tf_inb(io_ports->lbah_addr); | 180 | tf->lbah = tf_inb(io_ports->lbah_addr); |
181 | if (task->tf_flags & IDE_TFLAG_IN_DEVICE) | 181 | if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE) |
182 | tf->device = tf_inb(io_ports->device_addr); | 182 | tf->device = tf_inb(io_ports->device_addr); |
183 | 183 | ||
184 | if (task->tf_flags & IDE_TFLAG_LBA48) { | 184 | if (cmd->tf_flags & IDE_TFLAG_LBA48) { |
185 | tf_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); | 185 | tf_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); |
186 | 186 | ||
187 | if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) | 187 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) |
188 | tf->hob_feature = tf_inb(io_ports->feature_addr); | 188 | tf->hob_feature = tf_inb(io_ports->feature_addr); |
189 | if (task->tf_flags & IDE_TFLAG_IN_HOB_NSECT) | 189 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT) |
190 | tf->hob_nsect = tf_inb(io_ports->nsect_addr); | 190 | tf->hob_nsect = tf_inb(io_ports->nsect_addr); |
191 | if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAL) | 191 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL) |
192 | tf->hob_lbal = tf_inb(io_ports->lbal_addr); | 192 | tf->hob_lbal = tf_inb(io_ports->lbal_addr); |
193 | if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAM) | 193 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM) |
194 | tf->hob_lbam = tf_inb(io_ports->lbam_addr); | 194 | tf->hob_lbam = tf_inb(io_ports->lbam_addr); |
195 | if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAH) | 195 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH) |
196 | tf->hob_lbah = tf_inb(io_ports->lbah_addr); | 196 | tf->hob_lbah = tf_inb(io_ports->lbah_addr); |
197 | } | 197 | } |
198 | } | 198 | } |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 6eee41beec73..2900271c6ddd 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -144,21 +144,21 @@ int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, | |||
144 | } | 144 | } |
145 | EXPORT_SYMBOL_GPL(ide_end_dequeued_request); | 145 | EXPORT_SYMBOL_GPL(ide_end_dequeued_request); |
146 | 146 | ||
147 | void ide_complete_task(ide_drive_t *drive, ide_task_t *task, u8 stat, u8 err) | 147 | void ide_complete_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat, u8 err) |
148 | { | 148 | { |
149 | struct ide_taskfile *tf = &task->tf; | 149 | struct ide_taskfile *tf = &cmd->tf; |
150 | struct request *rq = task->rq; | 150 | struct request *rq = cmd->rq; |
151 | 151 | ||
152 | tf->error = err; | 152 | tf->error = err; |
153 | tf->status = stat; | 153 | tf->status = stat; |
154 | 154 | ||
155 | drive->hwif->tp_ops->tf_read(drive, task); | 155 | drive->hwif->tp_ops->tf_read(drive, cmd); |
156 | 156 | ||
157 | if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE) | 157 | if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE) |
158 | memcpy(rq->special, task, sizeof(*task)); | 158 | memcpy(rq->special, cmd, sizeof(*cmd)); |
159 | 159 | ||
160 | if (task->tf_flags & IDE_TFLAG_DYN) | 160 | if (cmd->tf_flags & IDE_TFLAG_DYN) |
161 | kfree(task); | 161 | kfree(cmd); |
162 | } | 162 | } |
163 | 163 | ||
164 | void ide_complete_rq(ide_drive_t *drive, u8 err) | 164 | void ide_complete_rq(ide_drive_t *drive, u8 err) |
@@ -217,20 +217,20 @@ static void ide_tf_set_setmult_cmd(ide_drive_t *drive, struct ide_taskfile *tf) | |||
217 | static ide_startstop_t ide_disk_special(ide_drive_t *drive) | 217 | static ide_startstop_t ide_disk_special(ide_drive_t *drive) |
218 | { | 218 | { |
219 | special_t *s = &drive->special; | 219 | special_t *s = &drive->special; |
220 | ide_task_t args; | 220 | struct ide_cmd cmd; |
221 | 221 | ||
222 | memset(&args, 0, sizeof(ide_task_t)); | 222 | memset(&cmd, 0, sizeof(cmd)); |
223 | args.data_phase = TASKFILE_NO_DATA; | 223 | cmd.data_phase = TASKFILE_NO_DATA; |
224 | 224 | ||
225 | if (s->b.set_geometry) { | 225 | if (s->b.set_geometry) { |
226 | s->b.set_geometry = 0; | 226 | s->b.set_geometry = 0; |
227 | ide_tf_set_specify_cmd(drive, &args.tf); | 227 | ide_tf_set_specify_cmd(drive, &cmd.tf); |
228 | } else if (s->b.recalibrate) { | 228 | } else if (s->b.recalibrate) { |
229 | s->b.recalibrate = 0; | 229 | s->b.recalibrate = 0; |
230 | ide_tf_set_restore_cmd(drive, &args.tf); | 230 | ide_tf_set_restore_cmd(drive, &cmd.tf); |
231 | } else if (s->b.set_multmode) { | 231 | } else if (s->b.set_multmode) { |
232 | s->b.set_multmode = 0; | 232 | s->b.set_multmode = 0; |
233 | ide_tf_set_setmult_cmd(drive, &args.tf); | 233 | ide_tf_set_setmult_cmd(drive, &cmd.tf); |
234 | } else if (s->all) { | 234 | } else if (s->all) { |
235 | int special = s->all; | 235 | int special = s->all; |
236 | s->all = 0; | 236 | s->all = 0; |
@@ -238,10 +238,10 @@ static ide_startstop_t ide_disk_special(ide_drive_t *drive) | |||
238 | return ide_stopped; | 238 | return ide_stopped; |
239 | } | 239 | } |
240 | 240 | ||
241 | args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE | | 241 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE | |
242 | IDE_TFLAG_CUSTOM_HANDLER; | 242 | IDE_TFLAG_CUSTOM_HANDLER; |
243 | 243 | ||
244 | do_rw_taskfile(drive, &args); | 244 | do_rw_taskfile(drive, &cmd); |
245 | 245 | ||
246 | return ide_started; | 246 | return ide_started; |
247 | } | 247 | } |
@@ -315,10 +315,10 @@ EXPORT_SYMBOL_GPL(ide_init_sg_cmd); | |||
315 | static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, | 315 | static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, |
316 | struct request *rq) | 316 | struct request *rq) |
317 | { | 317 | { |
318 | ide_task_t *task = rq->special; | 318 | struct ide_cmd *cmd = rq->special; |
319 | 319 | ||
320 | if (task) { | 320 | if (cmd) { |
321 | switch (task->data_phase) { | 321 | switch (cmd->data_phase) { |
322 | case TASKFILE_MULTI_OUT: | 322 | case TASKFILE_MULTI_OUT: |
323 | case TASKFILE_OUT: | 323 | case TASKFILE_OUT: |
324 | case TASKFILE_MULTI_IN: | 324 | case TASKFILE_MULTI_IN: |
@@ -329,7 +329,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, | |||
329 | break; | 329 | break; |
330 | } | 330 | } |
331 | 331 | ||
332 | return do_rw_taskfile(drive, task); | 332 | return do_rw_taskfile(drive, cmd); |
333 | } | 333 | } |
334 | 334 | ||
335 | /* | 335 | /* |
diff --git a/drivers/ide/ide-ioctls.c b/drivers/ide/ide-ioctls.c index 1be263eb9c07..4953028a13d4 100644 --- a/drivers/ide/ide-ioctls.c +++ b/drivers/ide/ide-ioctls.c | |||
@@ -111,13 +111,13 @@ static int ide_set_nice_ioctl(ide_drive_t *drive, unsigned long arg) | |||
111 | return 0; | 111 | return 0; |
112 | } | 112 | } |
113 | 113 | ||
114 | static int ide_cmd_ioctl(ide_drive_t *drive, unsigned cmd, unsigned long arg) | 114 | static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg) |
115 | { | 115 | { |
116 | u8 *buf = NULL; | 116 | u8 *buf = NULL; |
117 | int bufsize = 0, err = 0; | 117 | int bufsize = 0, err = 0; |
118 | u8 args[4], xfer_rate = 0; | 118 | u8 args[4], xfer_rate = 0; |
119 | ide_task_t tfargs; | 119 | struct ide_cmd cmd; |
120 | struct ide_taskfile *tf = &tfargs.tf; | 120 | struct ide_taskfile *tf = &cmd.tf; |
121 | u16 *id = drive->id; | 121 | u16 *id = drive->id; |
122 | 122 | ||
123 | if (NULL == (void *) arg) { | 123 | if (NULL == (void *) arg) { |
@@ -134,24 +134,24 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned cmd, unsigned long arg) | |||
134 | if (copy_from_user(args, (void __user *)arg, 4)) | 134 | if (copy_from_user(args, (void __user *)arg, 4)) |
135 | return -EFAULT; | 135 | return -EFAULT; |
136 | 136 | ||
137 | memset(&tfargs, 0, sizeof(ide_task_t)); | 137 | memset(&cmd, 0, sizeof(cmd)); |
138 | tf->feature = args[2]; | 138 | tf->feature = args[2]; |
139 | if (args[0] == ATA_CMD_SMART) { | 139 | if (args[0] == ATA_CMD_SMART) { |
140 | tf->nsect = args[3]; | 140 | tf->nsect = args[3]; |
141 | tf->lbal = args[1]; | 141 | tf->lbal = args[1]; |
142 | tf->lbam = 0x4f; | 142 | tf->lbam = 0x4f; |
143 | tf->lbah = 0xc2; | 143 | tf->lbah = 0xc2; |
144 | tfargs.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_IN_NSECT; | 144 | cmd.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_IN_NSECT; |
145 | } else { | 145 | } else { |
146 | tf->nsect = args[1]; | 146 | tf->nsect = args[1]; |
147 | tfargs.tf_flags = IDE_TFLAG_OUT_FEATURE | | 147 | cmd.tf_flags = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT | |
148 | IDE_TFLAG_OUT_NSECT | IDE_TFLAG_IN_NSECT; | 148 | IDE_TFLAG_IN_NSECT; |
149 | } | 149 | } |
150 | tf->command = args[0]; | 150 | tf->command = args[0]; |
151 | tfargs.data_phase = args[3] ? TASKFILE_IN : TASKFILE_NO_DATA; | 151 | cmd.data_phase = args[3] ? TASKFILE_IN : TASKFILE_NO_DATA; |
152 | 152 | ||
153 | if (args[3]) { | 153 | if (args[3]) { |
154 | tfargs.tf_flags |= IDE_TFLAG_IO_16BIT; | 154 | cmd.tf_flags |= IDE_TFLAG_IO_16BIT; |
155 | bufsize = SECTOR_SIZE * args[3]; | 155 | bufsize = SECTOR_SIZE * args[3]; |
156 | buf = kzalloc(bufsize, GFP_KERNEL); | 156 | buf = kzalloc(bufsize, GFP_KERNEL); |
157 | if (buf == NULL) | 157 | if (buf == NULL) |
@@ -172,7 +172,7 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned cmd, unsigned long arg) | |||
172 | } | 172 | } |
173 | } | 173 | } |
174 | 174 | ||
175 | err = ide_raw_taskfile(drive, &tfargs, buf, args[3]); | 175 | err = ide_raw_taskfile(drive, &cmd, buf, args[3]); |
176 | 176 | ||
177 | args[0] = tf->status; | 177 | args[0] = tf->status; |
178 | args[1] = tf->error; | 178 | args[1] = tf->error; |
@@ -194,25 +194,25 @@ abort: | |||
194 | return err; | 194 | return err; |
195 | } | 195 | } |
196 | 196 | ||
197 | static int ide_task_ioctl(ide_drive_t *drive, unsigned cmd, unsigned long arg) | 197 | static int ide_task_ioctl(ide_drive_t *drive, unsigned long arg) |
198 | { | 198 | { |
199 | void __user *p = (void __user *)arg; | 199 | void __user *p = (void __user *)arg; |
200 | int err = 0; | 200 | int err = 0; |
201 | u8 args[7]; | 201 | u8 args[7]; |
202 | ide_task_t task; | 202 | struct ide_cmd cmd; |
203 | 203 | ||
204 | if (copy_from_user(args, p, 7)) | 204 | if (copy_from_user(args, p, 7)) |
205 | return -EFAULT; | 205 | return -EFAULT; |
206 | 206 | ||
207 | memset(&task, 0, sizeof(task)); | 207 | memset(&cmd, 0, sizeof(cmd)); |
208 | memcpy(&task.tf_array[7], &args[1], 6); | 208 | memcpy(&cmd.tf_array[7], &args[1], 6); |
209 | task.tf.command = args[0]; | 209 | cmd.tf.command = args[0]; |
210 | task.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 210 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; |
211 | 211 | ||
212 | err = ide_no_data_taskfile(drive, &task); | 212 | err = ide_no_data_taskfile(drive, &cmd); |
213 | 213 | ||
214 | args[0] = task.tf.command; | 214 | args[0] = cmd.tf.command; |
215 | memcpy(&args[1], &task.tf_array[7], 6); | 215 | memcpy(&args[1], &cmd.tf_array[7], 6); |
216 | 216 | ||
217 | if (copy_to_user(p, args, 7)) | 217 | if (copy_to_user(p, args, 7)) |
218 | err = -EFAULT; | 218 | err = -EFAULT; |
@@ -262,17 +262,17 @@ int generic_ide_ioctl(ide_drive_t *drive, struct block_device *bdev, | |||
262 | if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO)) | 262 | if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO)) |
263 | return -EACCES; | 263 | return -EACCES; |
264 | if (drive->media == ide_disk) | 264 | if (drive->media == ide_disk) |
265 | return ide_taskfile_ioctl(drive, cmd, arg); | 265 | return ide_taskfile_ioctl(drive, arg); |
266 | return -ENOMSG; | 266 | return -ENOMSG; |
267 | #endif | 267 | #endif |
268 | case HDIO_DRIVE_CMD: | 268 | case HDIO_DRIVE_CMD: |
269 | if (!capable(CAP_SYS_RAWIO)) | 269 | if (!capable(CAP_SYS_RAWIO)) |
270 | return -EACCES; | 270 | return -EACCES; |
271 | return ide_cmd_ioctl(drive, cmd, arg); | 271 | return ide_cmd_ioctl(drive, arg); |
272 | case HDIO_DRIVE_TASK: | 272 | case HDIO_DRIVE_TASK: |
273 | if (!capable(CAP_SYS_RAWIO)) | 273 | if (!capable(CAP_SYS_RAWIO)) |
274 | return -EACCES; | 274 | return -EACCES; |
275 | return ide_task_ioctl(drive, cmd, arg); | 275 | return ide_task_ioctl(drive, arg); |
276 | case HDIO_DRIVE_RESET: | 276 | case HDIO_DRIVE_RESET: |
277 | if (!capable(CAP_SYS_ADMIN)) | 277 | if (!capable(CAP_SYS_ADMIN)) |
278 | return -EACCES; | 278 | return -EACCES; |
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 317c5dadd7c0..c3023de7270c 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -31,15 +31,15 @@ void SELECT_DRIVE(ide_drive_t *drive) | |||
31 | { | 31 | { |
32 | ide_hwif_t *hwif = drive->hwif; | 32 | ide_hwif_t *hwif = drive->hwif; |
33 | const struct ide_port_ops *port_ops = hwif->port_ops; | 33 | const struct ide_port_ops *port_ops = hwif->port_ops; |
34 | ide_task_t task; | 34 | struct ide_cmd cmd; |
35 | 35 | ||
36 | if (port_ops && port_ops->selectproc) | 36 | if (port_ops && port_ops->selectproc) |
37 | port_ops->selectproc(drive); | 37 | port_ops->selectproc(drive); |
38 | 38 | ||
39 | memset(&task, 0, sizeof(task)); | 39 | memset(&cmd, 0, sizeof(cmd)); |
40 | task.tf_flags = IDE_TFLAG_OUT_DEVICE; | 40 | cmd.tf_flags = IDE_TFLAG_OUT_DEVICE; |
41 | 41 | ||
42 | drive->hwif->tp_ops->tf_load(drive, &task); | 42 | drive->hwif->tp_ops->tf_load(drive, &cmd); |
43 | } | 43 | } |
44 | 44 | ||
45 | void SELECT_MASK(ide_drive_t *drive, int mask) | 45 | void SELECT_MASK(ide_drive_t *drive, int mask) |
@@ -52,14 +52,14 @@ void SELECT_MASK(ide_drive_t *drive, int mask) | |||
52 | 52 | ||
53 | u8 ide_read_error(ide_drive_t *drive) | 53 | u8 ide_read_error(ide_drive_t *drive) |
54 | { | 54 | { |
55 | ide_task_t task; | 55 | struct ide_cmd cmd; |
56 | 56 | ||
57 | memset(&task, 0, sizeof(task)); | 57 | memset(&cmd, 0, sizeof(cmd)); |
58 | task.tf_flags = IDE_TFLAG_IN_FEATURE; | 58 | cmd.tf_flags = IDE_TFLAG_IN_FEATURE; |
59 | 59 | ||
60 | drive->hwif->tp_ops->tf_read(drive, &task); | 60 | drive->hwif->tp_ops->tf_read(drive, &cmd); |
61 | 61 | ||
62 | return task.tf.error; | 62 | return cmd.tf.error; |
63 | } | 63 | } |
64 | EXPORT_SYMBOL_GPL(ide_read_error); | 64 | EXPORT_SYMBOL_GPL(ide_read_error); |
65 | 65 | ||
@@ -329,7 +329,7 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | |||
329 | u16 *id = drive->id, i; | 329 | u16 *id = drive->id, i; |
330 | int error = 0; | 330 | int error = 0; |
331 | u8 stat; | 331 | u8 stat; |
332 | ide_task_t task; | 332 | struct ide_cmd cmd; |
333 | 333 | ||
334 | #ifdef CONFIG_BLK_DEV_IDEDMA | 334 | #ifdef CONFIG_BLK_DEV_IDEDMA |
335 | if (hwif->dma_ops) /* check if host supports DMA */ | 335 | if (hwif->dma_ops) /* check if host supports DMA */ |
@@ -361,12 +361,12 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | |||
361 | udelay(1); | 361 | udelay(1); |
362 | tp_ops->set_irq(hwif, 0); | 362 | tp_ops->set_irq(hwif, 0); |
363 | 363 | ||
364 | memset(&task, 0, sizeof(task)); | 364 | memset(&cmd, 0, sizeof(cmd)); |
365 | task.tf_flags = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT; | 365 | cmd.tf_flags = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT; |
366 | task.tf.feature = SETFEATURES_XFER; | 366 | cmd.tf.feature = SETFEATURES_XFER; |
367 | task.tf.nsect = speed; | 367 | cmd.tf.nsect = speed; |
368 | 368 | ||
369 | tp_ops->tf_load(drive, &task); | 369 | tp_ops->tf_load(drive, &cmd); |
370 | 370 | ||
371 | tp_ops->exec_command(hwif, ATA_CMD_SET_FEATURES); | 371 | tp_ops->exec_command(hwif, ATA_CMD_SET_FEATURES); |
372 | 372 | ||
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index f6c683dd2987..217b7fdf2b17 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c | |||
@@ -34,19 +34,19 @@ void ide_toggle_bounce(ide_drive_t *drive, int on) | |||
34 | static void ide_dump_opcode(ide_drive_t *drive) | 34 | static void ide_dump_opcode(ide_drive_t *drive) |
35 | { | 35 | { |
36 | struct request *rq = drive->hwif->rq; | 36 | struct request *rq = drive->hwif->rq; |
37 | ide_task_t *task = NULL; | 37 | struct ide_cmd *cmd = NULL; |
38 | 38 | ||
39 | if (!rq) | 39 | if (!rq) |
40 | return; | 40 | return; |
41 | 41 | ||
42 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) | 42 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) |
43 | task = rq->special; | 43 | cmd = rq->special; |
44 | 44 | ||
45 | printk(KERN_ERR "ide: failed opcode was: "); | 45 | printk(KERN_ERR "ide: failed opcode was: "); |
46 | if (task == NULL) | 46 | if (cmd == NULL) |
47 | printk(KERN_CONT "unknown\n"); | 47 | printk(KERN_CONT "unknown\n"); |
48 | else | 48 | else |
49 | printk(KERN_CONT "0x%02x\n", task->tf.command); | 49 | printk(KERN_CONT "0x%02x\n", cmd->tf.command); |
50 | } | 50 | } |
51 | 51 | ||
52 | u64 ide_get_lba_addr(struct ide_taskfile *tf, int lba48) | 52 | u64 ide_get_lba_addr(struct ide_taskfile *tf, int lba48) |
@@ -66,18 +66,18 @@ EXPORT_SYMBOL_GPL(ide_get_lba_addr); | |||
66 | 66 | ||
67 | static void ide_dump_sector(ide_drive_t *drive) | 67 | static void ide_dump_sector(ide_drive_t *drive) |
68 | { | 68 | { |
69 | ide_task_t task; | 69 | struct ide_cmd cmd; |
70 | struct ide_taskfile *tf = &task.tf; | 70 | struct ide_taskfile *tf = &cmd.tf; |
71 | u8 lba48 = !!(drive->dev_flags & IDE_DFLAG_LBA48); | 71 | u8 lba48 = !!(drive->dev_flags & IDE_DFLAG_LBA48); |
72 | 72 | ||
73 | memset(&task, 0, sizeof(task)); | 73 | memset(&cmd, 0, sizeof(cmd)); |
74 | if (lba48) | 74 | if (lba48) |
75 | task.tf_flags = IDE_TFLAG_IN_LBA | IDE_TFLAG_IN_HOB_LBA | | 75 | cmd.tf_flags = IDE_TFLAG_IN_LBA | IDE_TFLAG_IN_HOB_LBA | |
76 | IDE_TFLAG_LBA48; | 76 | IDE_TFLAG_LBA48; |
77 | else | 77 | else |
78 | task.tf_flags = IDE_TFLAG_IN_LBA | IDE_TFLAG_IN_DEVICE; | 78 | cmd.tf_flags = IDE_TFLAG_IN_LBA | IDE_TFLAG_IN_DEVICE; |
79 | 79 | ||
80 | drive->hwif->tp_ops->tf_read(drive, &task); | 80 | drive->hwif->tp_ops->tf_read(drive, &cmd); |
81 | 81 | ||
82 | if (lba48 || (tf->device & ATA_LBA)) | 82 | if (lba48 || (tf->device & ATA_LBA)) |
83 | printk(KERN_CONT ", LBAsect=%llu", | 83 | printk(KERN_CONT ", LBAsect=%llu", |
diff --git a/drivers/ide/ide-park.c b/drivers/ide/ide-park.c index cddc7c778760..63c77f99a726 100644 --- a/drivers/ide/ide-park.c +++ b/drivers/ide/ide-park.c | |||
@@ -63,10 +63,10 @@ out: | |||
63 | 63 | ||
64 | ide_startstop_t ide_do_park_unpark(ide_drive_t *drive, struct request *rq) | 64 | ide_startstop_t ide_do_park_unpark(ide_drive_t *drive, struct request *rq) |
65 | { | 65 | { |
66 | ide_task_t task; | 66 | struct ide_cmd cmd; |
67 | struct ide_taskfile *tf = &task.tf; | 67 | struct ide_taskfile *tf = &cmd.tf; |
68 | 68 | ||
69 | memset(&task, 0, sizeof(task)); | 69 | memset(&cmd, 0, sizeof(cmd)); |
70 | if (rq->cmd[0] == REQ_PARK_HEADS) { | 70 | if (rq->cmd[0] == REQ_PARK_HEADS) { |
71 | drive->sleep = *(unsigned long *)rq->special; | 71 | drive->sleep = *(unsigned long *)rq->special; |
72 | drive->dev_flags |= IDE_DFLAG_SLEEPING; | 72 | drive->dev_flags |= IDE_DFLAG_SLEEPING; |
@@ -75,14 +75,15 @@ ide_startstop_t ide_do_park_unpark(ide_drive_t *drive, struct request *rq) | |||
75 | tf->lbal = 0x4c; | 75 | tf->lbal = 0x4c; |
76 | tf->lbam = 0x4e; | 76 | tf->lbam = 0x4e; |
77 | tf->lbah = 0x55; | 77 | tf->lbah = 0x55; |
78 | task.tf_flags |= IDE_TFLAG_CUSTOM_HANDLER; | 78 | cmd.tf_flags |= IDE_TFLAG_CUSTOM_HANDLER; |
79 | } else /* cmd == REQ_UNPARK_HEADS */ | 79 | } else /* cmd == REQ_UNPARK_HEADS */ |
80 | tf->command = ATA_CMD_CHK_POWER; | 80 | tf->command = ATA_CMD_CHK_POWER; |
81 | 81 | ||
82 | task.tf_flags |= IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 82 | cmd.tf_flags |= IDE_TFLAG_TF | IDE_TFLAG_DEVICE; |
83 | task.rq = rq; | 83 | cmd.rq = rq; |
84 | task.data_phase = TASKFILE_NO_DATA; | 84 | cmd.data_phase = TASKFILE_NO_DATA; |
85 | return do_rw_taskfile(drive, &task); | 85 | |
86 | return do_rw_taskfile(drive, &cmd); | ||
86 | } | 87 | } |
87 | 88 | ||
88 | ssize_t ide_park_show(struct device *dev, struct device_attribute *attr, | 89 | ssize_t ide_park_show(struct device *dev, struct device_attribute *attr, |
diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c index 74c7c2bbe0fd..5c9fc20f95b5 100644 --- a/drivers/ide/ide-pm.c +++ b/drivers/ide/ide-pm.c | |||
@@ -8,7 +8,7 @@ int generic_ide_suspend(struct device *dev, pm_message_t mesg) | |||
8 | ide_hwif_t *hwif = drive->hwif; | 8 | ide_hwif_t *hwif = drive->hwif; |
9 | struct request *rq; | 9 | struct request *rq; |
10 | struct request_pm_state rqpm; | 10 | struct request_pm_state rqpm; |
11 | ide_task_t args; | 11 | struct ide_cmd cmd; |
12 | int ret; | 12 | int ret; |
13 | 13 | ||
14 | /* call ACPI _GTM only once */ | 14 | /* call ACPI _GTM only once */ |
@@ -16,10 +16,10 @@ int generic_ide_suspend(struct device *dev, pm_message_t mesg) | |||
16 | ide_acpi_get_timing(hwif); | 16 | ide_acpi_get_timing(hwif); |
17 | 17 | ||
18 | memset(&rqpm, 0, sizeof(rqpm)); | 18 | memset(&rqpm, 0, sizeof(rqpm)); |
19 | memset(&args, 0, sizeof(args)); | 19 | memset(&cmd, 0, sizeof(cmd)); |
20 | rq = blk_get_request(drive->queue, READ, __GFP_WAIT); | 20 | rq = blk_get_request(drive->queue, READ, __GFP_WAIT); |
21 | rq->cmd_type = REQ_TYPE_PM_SUSPEND; | 21 | rq->cmd_type = REQ_TYPE_PM_SUSPEND; |
22 | rq->special = &args; | 22 | rq->special = &cmd; |
23 | rq->data = &rqpm; | 23 | rq->data = &rqpm; |
24 | rqpm.pm_step = IDE_PM_START_SUSPEND; | 24 | rqpm.pm_step = IDE_PM_START_SUSPEND; |
25 | if (mesg.event == PM_EVENT_PRETHAW) | 25 | if (mesg.event == PM_EVENT_PRETHAW) |
@@ -42,7 +42,7 @@ int generic_ide_resume(struct device *dev) | |||
42 | ide_hwif_t *hwif = drive->hwif; | 42 | ide_hwif_t *hwif = drive->hwif; |
43 | struct request *rq; | 43 | struct request *rq; |
44 | struct request_pm_state rqpm; | 44 | struct request_pm_state rqpm; |
45 | ide_task_t args; | 45 | struct ide_cmd cmd; |
46 | int err; | 46 | int err; |
47 | 47 | ||
48 | /* call ACPI _PS0 / _STM only once */ | 48 | /* call ACPI _PS0 / _STM only once */ |
@@ -54,11 +54,11 @@ int generic_ide_resume(struct device *dev) | |||
54 | ide_acpi_exec_tfs(drive); | 54 | ide_acpi_exec_tfs(drive); |
55 | 55 | ||
56 | memset(&rqpm, 0, sizeof(rqpm)); | 56 | memset(&rqpm, 0, sizeof(rqpm)); |
57 | memset(&args, 0, sizeof(args)); | 57 | memset(&cmd, 0, sizeof(cmd)); |
58 | rq = blk_get_request(drive->queue, READ, __GFP_WAIT); | 58 | rq = blk_get_request(drive->queue, READ, __GFP_WAIT); |
59 | rq->cmd_type = REQ_TYPE_PM_RESUME; | 59 | rq->cmd_type = REQ_TYPE_PM_RESUME; |
60 | rq->cmd_flags |= REQ_PREEMPT; | 60 | rq->cmd_flags |= REQ_PREEMPT; |
61 | rq->special = &args; | 61 | rq->special = &cmd; |
62 | rq->data = &rqpm; | 62 | rq->data = &rqpm; |
63 | rqpm.pm_step = IDE_PM_START_RESUME; | 63 | rqpm.pm_step = IDE_PM_START_RESUME; |
64 | rqpm.pm_state = PM_EVENT_ON; | 64 | rqpm.pm_state = PM_EVENT_ON; |
@@ -109,9 +109,9 @@ void ide_complete_power_step(ide_drive_t *drive, struct request *rq) | |||
109 | ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *rq) | 109 | ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *rq) |
110 | { | 110 | { |
111 | struct request_pm_state *pm = rq->data; | 111 | struct request_pm_state *pm = rq->data; |
112 | ide_task_t *args = rq->special; | 112 | struct ide_cmd *cmd = rq->special; |
113 | 113 | ||
114 | memset(args, 0, sizeof(*args)); | 114 | memset(cmd, 0, sizeof(*cmd)); |
115 | 115 | ||
116 | switch (pm->pm_step) { | 116 | switch (pm->pm_step) { |
117 | case IDE_PM_FLUSH_CACHE: /* Suspend step 1 (flush cache) */ | 117 | case IDE_PM_FLUSH_CACHE: /* Suspend step 1 (flush cache) */ |
@@ -124,12 +124,12 @@ ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *rq) | |||
124 | return ide_stopped; | 124 | return ide_stopped; |
125 | } | 125 | } |
126 | if (ata_id_flush_ext_enabled(drive->id)) | 126 | if (ata_id_flush_ext_enabled(drive->id)) |
127 | args->tf.command = ATA_CMD_FLUSH_EXT; | 127 | cmd->tf.command = ATA_CMD_FLUSH_EXT; |
128 | else | 128 | else |
129 | args->tf.command = ATA_CMD_FLUSH; | 129 | cmd->tf.command = ATA_CMD_FLUSH; |
130 | goto out_do_tf; | 130 | goto out_do_tf; |
131 | case IDE_PM_STANDBY: /* Suspend step 2 (standby) */ | 131 | case IDE_PM_STANDBY: /* Suspend step 2 (standby) */ |
132 | args->tf.command = ATA_CMD_STANDBYNOW1; | 132 | cmd->tf.command = ATA_CMD_STANDBYNOW1; |
133 | goto out_do_tf; | 133 | goto out_do_tf; |
134 | case IDE_PM_RESTORE_PIO: /* Resume step 1 (restore PIO) */ | 134 | case IDE_PM_RESTORE_PIO: /* Resume step 1 (restore PIO) */ |
135 | ide_set_max_pio(drive); | 135 | ide_set_max_pio(drive); |
@@ -142,7 +142,7 @@ ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *rq) | |||
142 | ide_complete_power_step(drive, rq); | 142 | ide_complete_power_step(drive, rq); |
143 | return ide_stopped; | 143 | return ide_stopped; |
144 | case IDE_PM_IDLE: /* Resume step 2 (idle) */ | 144 | case IDE_PM_IDLE: /* Resume step 2 (idle) */ |
145 | args->tf.command = ATA_CMD_IDLEIMMEDIATE; | 145 | cmd->tf.command = ATA_CMD_IDLEIMMEDIATE; |
146 | goto out_do_tf; | 146 | goto out_do_tf; |
147 | case IDE_PM_RESTORE_DMA: /* Resume step 3 (restore DMA) */ | 147 | case IDE_PM_RESTORE_DMA: /* Resume step 3 (restore DMA) */ |
148 | /* | 148 | /* |
@@ -160,12 +160,14 @@ ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *rq) | |||
160 | } | 160 | } |
161 | 161 | ||
162 | pm->pm_step = IDE_PM_COMPLETED; | 162 | pm->pm_step = IDE_PM_COMPLETED; |
163 | |||
163 | return ide_stopped; | 164 | return ide_stopped; |
164 | 165 | ||
165 | out_do_tf: | 166 | out_do_tf: |
166 | args->tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 167 | cmd->tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; |
167 | args->data_phase = TASKFILE_NO_DATA; | 168 | cmd->data_phase = TASKFILE_NO_DATA; |
168 | return do_rw_taskfile(drive, args); | 169 | |
170 | return do_rw_taskfile(drive, cmd); | ||
169 | } | 171 | } |
170 | 172 | ||
171 | /** | 173 | /** |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 335322f40c5a..548864510ba9 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -283,13 +283,13 @@ int ide_dev_read_id(ide_drive_t *drive, u8 cmd, u16 *id) | |||
283 | * identify command to be sure of reply | 283 | * identify command to be sure of reply |
284 | */ | 284 | */ |
285 | if (cmd == ATA_CMD_ID_ATAPI) { | 285 | if (cmd == ATA_CMD_ID_ATAPI) { |
286 | ide_task_t task; | 286 | struct ide_cmd cmd; |
287 | 287 | ||
288 | memset(&task, 0, sizeof(task)); | 288 | memset(&cmd, 0, sizeof(cmd)); |
289 | /* disable DMA & overlap */ | 289 | /* disable DMA & overlap */ |
290 | task.tf_flags = IDE_TFLAG_OUT_FEATURE; | 290 | cmd.tf_flags = IDE_TFLAG_OUT_FEATURE; |
291 | 291 | ||
292 | tp_ops->tf_load(drive, &task); | 292 | tp_ops->tf_load(drive, &cmd); |
293 | } | 293 | } |
294 | 294 | ||
295 | /* ask drive for ID */ | 295 | /* ask drive for ID */ |
@@ -337,14 +337,14 @@ int ide_busy_sleep(ide_hwif_t *hwif, unsigned long timeout, int altstatus) | |||
337 | 337 | ||
338 | static u8 ide_read_device(ide_drive_t *drive) | 338 | static u8 ide_read_device(ide_drive_t *drive) |
339 | { | 339 | { |
340 | ide_task_t task; | 340 | struct ide_cmd cmd; |
341 | 341 | ||
342 | memset(&task, 0, sizeof(task)); | 342 | memset(&cmd, 0, sizeof(cmd)); |
343 | task.tf_flags = IDE_TFLAG_IN_DEVICE; | 343 | cmd.tf_flags = IDE_TFLAG_IN_DEVICE; |
344 | 344 | ||
345 | drive->hwif->tp_ops->tf_read(drive, &task); | 345 | drive->hwif->tp_ops->tf_read(drive, &cmd); |
346 | 346 | ||
347 | return task.tf.device; | 347 | return cmd.tf.device; |
348 | } | 348 | } |
349 | 349 | ||
350 | /** | 350 | /** |
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index 417cde56eafd..10a88bf3eefa 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -194,20 +194,20 @@ ide_devset_get(xfer_rate, current_speed); | |||
194 | 194 | ||
195 | static int set_xfer_rate (ide_drive_t *drive, int arg) | 195 | static int set_xfer_rate (ide_drive_t *drive, int arg) |
196 | { | 196 | { |
197 | ide_task_t task; | 197 | struct ide_cmd cmd; |
198 | int err; | 198 | int err; |
199 | 199 | ||
200 | if (arg < XFER_PIO_0 || arg > XFER_UDMA_6) | 200 | if (arg < XFER_PIO_0 || arg > XFER_UDMA_6) |
201 | return -EINVAL; | 201 | return -EINVAL; |
202 | 202 | ||
203 | memset(&task, 0, sizeof(task)); | 203 | memset(&cmd, 0, sizeof(cmd)); |
204 | task.tf.command = ATA_CMD_SET_FEATURES; | 204 | cmd.tf.command = ATA_CMD_SET_FEATURES; |
205 | task.tf.feature = SETFEATURES_XFER; | 205 | cmd.tf.feature = SETFEATURES_XFER; |
206 | task.tf.nsect = (u8)arg; | 206 | cmd.tf.nsect = (u8)arg; |
207 | task.tf_flags = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT | | 207 | cmd.tf_flags = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT | |
208 | IDE_TFLAG_IN_NSECT; | 208 | IDE_TFLAG_IN_NSECT; |
209 | 209 | ||
210 | err = ide_no_data_taskfile(drive, &task); | 210 | err = ide_no_data_taskfile(drive, &cmd); |
211 | 211 | ||
212 | if (!err) { | 212 | if (!err) { |
213 | ide_set_xfer_rate(drive, (u8) arg); | 213 | ide_set_xfer_rate(drive, (u8) arg); |
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 925fb9241893..2b85c137764a 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -39,33 +39,34 @@ void ide_tf_dump(const char *s, struct ide_taskfile *tf) | |||
39 | 39 | ||
40 | int taskfile_lib_get_identify (ide_drive_t *drive, u8 *buf) | 40 | int taskfile_lib_get_identify (ide_drive_t *drive, u8 *buf) |
41 | { | 41 | { |
42 | ide_task_t args; | 42 | struct ide_cmd cmd; |
43 | 43 | ||
44 | memset(&args, 0, sizeof(ide_task_t)); | 44 | memset(&cmd, 0, sizeof(cmd)); |
45 | args.tf.nsect = 0x01; | 45 | cmd.tf.nsect = 0x01; |
46 | if (drive->media == ide_disk) | 46 | if (drive->media == ide_disk) |
47 | args.tf.command = ATA_CMD_ID_ATA; | 47 | cmd.tf.command = ATA_CMD_ID_ATA; |
48 | else | 48 | else |
49 | args.tf.command = ATA_CMD_ID_ATAPI; | 49 | cmd.tf.command = ATA_CMD_ID_ATAPI; |
50 | args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 50 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; |
51 | args.data_phase = TASKFILE_IN; | 51 | cmd.data_phase = TASKFILE_IN; |
52 | return ide_raw_taskfile(drive, &args, buf, 1); | 52 | |
53 | return ide_raw_taskfile(drive, &cmd, buf, 1); | ||
53 | } | 54 | } |
54 | 55 | ||
55 | static ide_startstop_t task_no_data_intr(ide_drive_t *); | 56 | static ide_startstop_t task_no_data_intr(ide_drive_t *); |
56 | static ide_startstop_t pre_task_out_intr(ide_drive_t *, struct request *); | 57 | static ide_startstop_t pre_task_out_intr(ide_drive_t *, struct request *); |
57 | static ide_startstop_t task_in_intr(ide_drive_t *); | 58 | static ide_startstop_t task_in_intr(ide_drive_t *); |
58 | 59 | ||
59 | ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) | 60 | ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd) |
60 | { | 61 | { |
61 | ide_hwif_t *hwif = drive->hwif; | 62 | ide_hwif_t *hwif = drive->hwif; |
62 | struct ide_taskfile *tf = &task->tf; | 63 | struct ide_taskfile *tf = &cmd->tf; |
63 | ide_handler_t *handler = NULL; | 64 | ide_handler_t *handler = NULL; |
64 | const struct ide_tp_ops *tp_ops = hwif->tp_ops; | 65 | const struct ide_tp_ops *tp_ops = hwif->tp_ops; |
65 | const struct ide_dma_ops *dma_ops = hwif->dma_ops; | 66 | const struct ide_dma_ops *dma_ops = hwif->dma_ops; |
66 | 67 | ||
67 | if (task->data_phase == TASKFILE_MULTI_IN || | 68 | if (cmd->data_phase == TASKFILE_MULTI_IN || |
68 | task->data_phase == TASKFILE_MULTI_OUT) { | 69 | cmd->data_phase == TASKFILE_MULTI_OUT) { |
69 | if (!drive->mult_count) { | 70 | if (!drive->mult_count) { |
70 | printk(KERN_ERR "%s: multimode not set!\n", | 71 | printk(KERN_ERR "%s: multimode not set!\n", |
71 | drive->name); | 72 | drive->name); |
@@ -73,24 +74,24 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) | |||
73 | } | 74 | } |
74 | } | 75 | } |
75 | 76 | ||
76 | if (task->ftf_flags & IDE_FTFLAG_FLAGGED) | 77 | if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED) |
77 | task->ftf_flags |= IDE_FTFLAG_SET_IN_FLAGS; | 78 | cmd->ftf_flags |= IDE_FTFLAG_SET_IN_FLAGS; |
78 | 79 | ||
79 | memcpy(&hwif->task, task, sizeof(*task)); | 80 | memcpy(&hwif->cmd, cmd, sizeof(*cmd)); |
80 | 81 | ||
81 | if ((task->tf_flags & IDE_TFLAG_DMA_PIO_FALLBACK) == 0) { | 82 | if ((cmd->tf_flags & IDE_TFLAG_DMA_PIO_FALLBACK) == 0) { |
82 | ide_tf_dump(drive->name, tf); | 83 | ide_tf_dump(drive->name, tf); |
83 | tp_ops->set_irq(hwif, 1); | 84 | tp_ops->set_irq(hwif, 1); |
84 | SELECT_MASK(drive, 0); | 85 | SELECT_MASK(drive, 0); |
85 | tp_ops->tf_load(drive, task); | 86 | tp_ops->tf_load(drive, cmd); |
86 | } | 87 | } |
87 | 88 | ||
88 | switch (task->data_phase) { | 89 | switch (cmd->data_phase) { |
89 | case TASKFILE_MULTI_OUT: | 90 | case TASKFILE_MULTI_OUT: |
90 | case TASKFILE_OUT: | 91 | case TASKFILE_OUT: |
91 | tp_ops->exec_command(hwif, tf->command); | 92 | tp_ops->exec_command(hwif, tf->command); |
92 | ndelay(400); /* FIXME */ | 93 | ndelay(400); /* FIXME */ |
93 | return pre_task_out_intr(drive, task->rq); | 94 | return pre_task_out_intr(drive, cmd->rq); |
94 | case TASKFILE_MULTI_IN: | 95 | case TASKFILE_MULTI_IN: |
95 | case TASKFILE_IN: | 96 | case TASKFILE_IN: |
96 | handler = task_in_intr; | 97 | handler = task_in_intr; |
@@ -119,9 +120,9 @@ EXPORT_SYMBOL_GPL(do_rw_taskfile); | |||
119 | static ide_startstop_t task_no_data_intr(ide_drive_t *drive) | 120 | static ide_startstop_t task_no_data_intr(ide_drive_t *drive) |
120 | { | 121 | { |
121 | ide_hwif_t *hwif = drive->hwif; | 122 | ide_hwif_t *hwif = drive->hwif; |
122 | ide_task_t *task = &hwif->task; | 123 | struct ide_cmd *cmd = &hwif->cmd; |
123 | struct ide_taskfile *tf = &task->tf; | 124 | struct ide_taskfile *tf = &cmd->tf; |
124 | int custom = (task->tf_flags & IDE_TFLAG_CUSTOM_HANDLER) ? 1 : 0; | 125 | int custom = (cmd->tf_flags & IDE_TFLAG_CUSTOM_HANDLER) ? 1 : 0; |
125 | int retries = (custom && tf->command == ATA_CMD_INIT_DEV_PARAMS) ? 5 : 1; | 126 | int retries = (custom && tf->command == ATA_CMD_INIT_DEV_PARAMS) ? 5 : 1; |
126 | u8 stat; | 127 | u8 stat; |
127 | 128 | ||
@@ -151,7 +152,7 @@ static ide_startstop_t task_no_data_intr(ide_drive_t *drive) | |||
151 | } | 152 | } |
152 | 153 | ||
153 | if (custom && tf->command == ATA_CMD_IDLEIMMEDIATE) { | 154 | if (custom && tf->command == ATA_CMD_IDLEIMMEDIATE) { |
154 | hwif->tp_ops->tf_read(drive, task); | 155 | hwif->tp_ops->tf_read(drive, cmd); |
155 | if (tf->lbal != 0xc4) { | 156 | if (tf->lbal != 0xc4) { |
156 | printk(KERN_ERR "%s: head unload failed!\n", | 157 | printk(KERN_ERR "%s: head unload failed!\n", |
157 | drive->name); | 158 | drive->name); |
@@ -169,7 +170,7 @@ static ide_startstop_t task_no_data_intr(ide_drive_t *drive) | |||
169 | ide_complete_pm_rq(drive, rq); | 170 | ide_complete_pm_rq(drive, rq); |
170 | else { | 171 | else { |
171 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) | 172 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) |
172 | ide_complete_task(drive, task, stat, err); | 173 | ide_complete_cmd(drive, cmd, stat, err); |
173 | ide_complete_rq(drive, err); | 174 | ide_complete_rq(drive, err); |
174 | } | 175 | } |
175 | } | 176 | } |
@@ -266,18 +267,18 @@ static void ide_pio_multi(ide_drive_t *drive, struct request *rq, | |||
266 | static void ide_pio_datablock(ide_drive_t *drive, struct request *rq, | 267 | static void ide_pio_datablock(ide_drive_t *drive, struct request *rq, |
267 | unsigned int write) | 268 | unsigned int write) |
268 | { | 269 | { |
269 | ide_task_t *task = &drive->hwif->task; | 270 | struct ide_cmd *cmd = &drive->hwif->cmd; |
270 | u8 saved_io_32bit = drive->io_32bit; | 271 | u8 saved_io_32bit = drive->io_32bit; |
271 | 272 | ||
272 | if (blk_fs_request(rq)) | 273 | if (blk_fs_request(rq)) |
273 | rq->errors = 0; | 274 | rq->errors = 0; |
274 | 275 | ||
275 | if (task->tf_flags & IDE_TFLAG_IO_16BIT) | 276 | if (cmd->tf_flags & IDE_TFLAG_IO_16BIT) |
276 | drive->io_32bit = 0; | 277 | drive->io_32bit = 0; |
277 | 278 | ||
278 | touch_softlockup_watchdog(); | 279 | touch_softlockup_watchdog(); |
279 | 280 | ||
280 | switch (task->data_phase) { | 281 | switch (cmd->data_phase) { |
281 | case TASKFILE_MULTI_IN: | 282 | case TASKFILE_MULTI_IN: |
282 | case TASKFILE_MULTI_OUT: | 283 | case TASKFILE_MULTI_OUT: |
283 | ide_pio_multi(drive, rq, write); | 284 | ide_pio_multi(drive, rq, write); |
@@ -295,10 +296,10 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq, | |||
295 | { | 296 | { |
296 | if (blk_fs_request(rq)) { | 297 | if (blk_fs_request(rq)) { |
297 | ide_hwif_t *hwif = drive->hwif; | 298 | ide_hwif_t *hwif = drive->hwif; |
298 | ide_task_t *task = &hwif->task; | 299 | struct ide_cmd *cmd = &hwif->cmd; |
299 | int sectors = hwif->nsect - hwif->nleft; | 300 | int sectors = hwif->nsect - hwif->nleft; |
300 | 301 | ||
301 | switch (task->data_phase) { | 302 | switch (cmd->data_phase) { |
302 | case TASKFILE_IN: | 303 | case TASKFILE_IN: |
303 | if (hwif->nleft) | 304 | if (hwif->nleft) |
304 | break; | 305 | break; |
@@ -325,11 +326,11 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq, | |||
325 | void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat) | 326 | void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat) |
326 | { | 327 | { |
327 | if (blk_fs_request(rq) == 0) { | 328 | if (blk_fs_request(rq) == 0) { |
328 | ide_task_t *task = rq->special; | 329 | struct ide_cmd *cmd = rq->special; |
329 | u8 err = ide_read_error(drive); | 330 | u8 err = ide_read_error(drive); |
330 | 331 | ||
331 | if (task) | 332 | if (cmd) |
332 | ide_complete_task(drive, task, stat, err); | 333 | ide_complete_cmd(drive, cmd, stat, err); |
333 | ide_complete_rq(drive, err); | 334 | ide_complete_rq(drive, err); |
334 | return; | 335 | return; |
335 | } | 336 | } |
@@ -420,14 +421,14 @@ static ide_startstop_t task_out_intr (ide_drive_t *drive) | |||
420 | 421 | ||
421 | static ide_startstop_t pre_task_out_intr(ide_drive_t *drive, struct request *rq) | 422 | static ide_startstop_t pre_task_out_intr(ide_drive_t *drive, struct request *rq) |
422 | { | 423 | { |
423 | ide_task_t *task = &drive->hwif->task; | 424 | struct ide_cmd *cmd = &drive->hwif->cmd; |
424 | ide_startstop_t startstop; | 425 | ide_startstop_t startstop; |
425 | 426 | ||
426 | if (ide_wait_stat(&startstop, drive, ATA_DRQ, | 427 | if (ide_wait_stat(&startstop, drive, ATA_DRQ, |
427 | drive->bad_wstat, WAIT_DRQ)) { | 428 | drive->bad_wstat, WAIT_DRQ)) { |
428 | printk(KERN_ERR "%s: no DRQ after issuing %sWRITE%s\n", | 429 | printk(KERN_ERR "%s: no DRQ after issuing %sWRITE%s\n", |
429 | drive->name, | 430 | drive->name, |
430 | task->data_phase == TASKFILE_MULTI_OUT ? "MULT" : "", | 431 | cmd->data_phase == TASKFILE_MULTI_OUT ? "MULT" : "", |
431 | (drive->dev_flags & IDE_DFLAG_LBA48) ? "_EXT" : ""); | 432 | (drive->dev_flags & IDE_DFLAG_LBA48) ? "_EXT" : ""); |
432 | return startstop; | 433 | return startstop; |
433 | } | 434 | } |
@@ -441,7 +442,8 @@ static ide_startstop_t pre_task_out_intr(ide_drive_t *drive, struct request *rq) | |||
441 | return ide_started; | 442 | return ide_started; |
442 | } | 443 | } |
443 | 444 | ||
444 | int ide_raw_taskfile(ide_drive_t *drive, ide_task_t *task, u8 *buf, u16 nsect) | 445 | int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf, |
446 | u16 nsect) | ||
445 | { | 447 | { |
446 | struct request *rq; | 448 | struct request *rq; |
447 | int error; | 449 | int error; |
@@ -459,11 +461,11 @@ int ide_raw_taskfile(ide_drive_t *drive, ide_task_t *task, u8 *buf, u16 nsect) | |||
459 | rq->hard_nr_sectors = rq->nr_sectors = nsect; | 461 | rq->hard_nr_sectors = rq->nr_sectors = nsect; |
460 | rq->hard_cur_sectors = rq->current_nr_sectors = nsect; | 462 | rq->hard_cur_sectors = rq->current_nr_sectors = nsect; |
461 | 463 | ||
462 | if (task->tf_flags & IDE_TFLAG_WRITE) | 464 | if (cmd->tf_flags & IDE_TFLAG_WRITE) |
463 | rq->cmd_flags |= REQ_RW; | 465 | rq->cmd_flags |= REQ_RW; |
464 | 466 | ||
465 | rq->special = task; | 467 | rq->special = cmd; |
466 | task->rq = rq; | 468 | cmd->rq = rq; |
467 | 469 | ||
468 | error = blk_execute_rq(drive->queue, NULL, rq, 0); | 470 | error = blk_execute_rq(drive->queue, NULL, rq, 0); |
469 | blk_put_request(rq); | 471 | blk_put_request(rq); |
@@ -473,19 +475,19 @@ int ide_raw_taskfile(ide_drive_t *drive, ide_task_t *task, u8 *buf, u16 nsect) | |||
473 | 475 | ||
474 | EXPORT_SYMBOL(ide_raw_taskfile); | 476 | EXPORT_SYMBOL(ide_raw_taskfile); |
475 | 477 | ||
476 | int ide_no_data_taskfile(ide_drive_t *drive, ide_task_t *task) | 478 | int ide_no_data_taskfile(ide_drive_t *drive, struct ide_cmd *cmd) |
477 | { | 479 | { |
478 | task->data_phase = TASKFILE_NO_DATA; | 480 | cmd->data_phase = TASKFILE_NO_DATA; |
479 | 481 | ||
480 | return ide_raw_taskfile(drive, task, NULL, 0); | 482 | return ide_raw_taskfile(drive, cmd, NULL, 0); |
481 | } | 483 | } |
482 | EXPORT_SYMBOL_GPL(ide_no_data_taskfile); | 484 | EXPORT_SYMBOL_GPL(ide_no_data_taskfile); |
483 | 485 | ||
484 | #ifdef CONFIG_IDE_TASK_IOCTL | 486 | #ifdef CONFIG_IDE_TASK_IOCTL |
485 | int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) | 487 | int ide_taskfile_ioctl(ide_drive_t *drive, unsigned long arg) |
486 | { | 488 | { |
487 | ide_task_request_t *req_task; | 489 | ide_task_request_t *req_task; |
488 | ide_task_t args; | 490 | struct ide_cmd cmd; |
489 | u8 *outbuf = NULL; | 491 | u8 *outbuf = NULL; |
490 | u8 *inbuf = NULL; | 492 | u8 *inbuf = NULL; |
491 | u8 *data_buf = NULL; | 493 | u8 *data_buf = NULL; |
@@ -539,51 +541,53 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) | |||
539 | } | 541 | } |
540 | } | 542 | } |
541 | 543 | ||
542 | memset(&args, 0, sizeof(ide_task_t)); | 544 | memset(&cmd, 0, sizeof(cmd)); |
543 | 545 | ||
544 | memcpy(&args.tf_array[0], req_task->hob_ports, HDIO_DRIVE_HOB_HDR_SIZE - 2); | 546 | memcpy(&cmd.tf_array[0], req_task->hob_ports, |
545 | memcpy(&args.tf_array[6], req_task->io_ports, HDIO_DRIVE_TASK_HDR_SIZE); | 547 | HDIO_DRIVE_HOB_HDR_SIZE - 2); |
548 | memcpy(&cmd.tf_array[6], req_task->io_ports, | ||
549 | HDIO_DRIVE_TASK_HDR_SIZE); | ||
546 | 550 | ||
547 | args.data_phase = req_task->data_phase; | 551 | cmd.data_phase = req_task->data_phase; |
552 | cmd.tf_flags = IDE_TFLAG_IO_16BIT | IDE_TFLAG_DEVICE | | ||
553 | IDE_TFLAG_IN_TF; | ||
548 | 554 | ||
549 | args.tf_flags = IDE_TFLAG_IO_16BIT | IDE_TFLAG_DEVICE | | ||
550 | IDE_TFLAG_IN_TF; | ||
551 | if (drive->dev_flags & IDE_DFLAG_LBA48) | 555 | if (drive->dev_flags & IDE_DFLAG_LBA48) |
552 | args.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_IN_HOB); | 556 | cmd.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_IN_HOB); |
553 | 557 | ||
554 | if (req_task->out_flags.all) { | 558 | if (req_task->out_flags.all) { |
555 | args.ftf_flags |= IDE_FTFLAG_FLAGGED; | 559 | cmd.ftf_flags |= IDE_FTFLAG_FLAGGED; |
556 | 560 | ||
557 | if (req_task->out_flags.b.data) | 561 | if (req_task->out_flags.b.data) |
558 | args.ftf_flags |= IDE_FTFLAG_OUT_DATA; | 562 | cmd.ftf_flags |= IDE_FTFLAG_OUT_DATA; |
559 | 563 | ||
560 | if (req_task->out_flags.b.nsector_hob) | 564 | if (req_task->out_flags.b.nsector_hob) |
561 | args.tf_flags |= IDE_TFLAG_OUT_HOB_NSECT; | 565 | cmd.tf_flags |= IDE_TFLAG_OUT_HOB_NSECT; |
562 | if (req_task->out_flags.b.sector_hob) | 566 | if (req_task->out_flags.b.sector_hob) |
563 | args.tf_flags |= IDE_TFLAG_OUT_HOB_LBAL; | 567 | cmd.tf_flags |= IDE_TFLAG_OUT_HOB_LBAL; |
564 | if (req_task->out_flags.b.lcyl_hob) | 568 | if (req_task->out_flags.b.lcyl_hob) |
565 | args.tf_flags |= IDE_TFLAG_OUT_HOB_LBAM; | 569 | cmd.tf_flags |= IDE_TFLAG_OUT_HOB_LBAM; |
566 | if (req_task->out_flags.b.hcyl_hob) | 570 | if (req_task->out_flags.b.hcyl_hob) |
567 | args.tf_flags |= IDE_TFLAG_OUT_HOB_LBAH; | 571 | cmd.tf_flags |= IDE_TFLAG_OUT_HOB_LBAH; |
568 | 572 | ||
569 | if (req_task->out_flags.b.error_feature) | 573 | if (req_task->out_flags.b.error_feature) |
570 | args.tf_flags |= IDE_TFLAG_OUT_FEATURE; | 574 | cmd.tf_flags |= IDE_TFLAG_OUT_FEATURE; |
571 | if (req_task->out_flags.b.nsector) | 575 | if (req_task->out_flags.b.nsector) |
572 | args.tf_flags |= IDE_TFLAG_OUT_NSECT; | 576 | cmd.tf_flags |= IDE_TFLAG_OUT_NSECT; |
573 | if (req_task->out_flags.b.sector) | 577 | if (req_task->out_flags.b.sector) |
574 | args.tf_flags |= IDE_TFLAG_OUT_LBAL; | 578 | cmd.tf_flags |= IDE_TFLAG_OUT_LBAL; |
575 | if (req_task->out_flags.b.lcyl) | 579 | if (req_task->out_flags.b.lcyl) |
576 | args.tf_flags |= IDE_TFLAG_OUT_LBAM; | 580 | cmd.tf_flags |= IDE_TFLAG_OUT_LBAM; |
577 | if (req_task->out_flags.b.hcyl) | 581 | if (req_task->out_flags.b.hcyl) |
578 | args.tf_flags |= IDE_TFLAG_OUT_LBAH; | 582 | cmd.tf_flags |= IDE_TFLAG_OUT_LBAH; |
579 | } else { | 583 | } else { |
580 | args.tf_flags |= IDE_TFLAG_OUT_TF; | 584 | cmd.tf_flags |= IDE_TFLAG_OUT_TF; |
581 | if (args.tf_flags & IDE_TFLAG_LBA48) | 585 | if (cmd.tf_flags & IDE_TFLAG_LBA48) |
582 | args.tf_flags |= IDE_TFLAG_OUT_HOB; | 586 | cmd.tf_flags |= IDE_TFLAG_OUT_HOB; |
583 | } | 587 | } |
584 | 588 | ||
585 | if (req_task->in_flags.b.data) | 589 | if (req_task->in_flags.b.data) |
586 | args.ftf_flags |= IDE_FTFLAG_IN_DATA; | 590 | cmd.ftf_flags |= IDE_FTFLAG_IN_DATA; |
587 | 591 | ||
588 | switch(req_task->data_phase) { | 592 | switch(req_task->data_phase) { |
589 | case TASKFILE_MULTI_OUT: | 593 | case TASKFILE_MULTI_OUT: |
@@ -630,7 +634,7 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) | |||
630 | if (req_task->req_cmd == IDE_DRIVE_TASK_NO_DATA) | 634 | if (req_task->req_cmd == IDE_DRIVE_TASK_NO_DATA) |
631 | nsect = 0; | 635 | nsect = 0; |
632 | else if (!nsect) { | 636 | else if (!nsect) { |
633 | nsect = (args.tf.hob_nsect << 8) | args.tf.nsect; | 637 | nsect = (cmd.tf.hob_nsect << 8) | cmd.tf.nsect; |
634 | 638 | ||
635 | if (!nsect) { | 639 | if (!nsect) { |
636 | printk(KERN_ERR "%s: in/out command without data\n", | 640 | printk(KERN_ERR "%s: in/out command without data\n", |
@@ -641,14 +645,16 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) | |||
641 | } | 645 | } |
642 | 646 | ||
643 | if (req_task->req_cmd == IDE_DRIVE_TASK_RAW_WRITE) | 647 | if (req_task->req_cmd == IDE_DRIVE_TASK_RAW_WRITE) |
644 | args.tf_flags |= IDE_TFLAG_WRITE; | 648 | cmd.tf_flags |= IDE_TFLAG_WRITE; |
645 | 649 | ||
646 | err = ide_raw_taskfile(drive, &args, data_buf, nsect); | 650 | err = ide_raw_taskfile(drive, &cmd, data_buf, nsect); |
647 | 651 | ||
648 | memcpy(req_task->hob_ports, &args.tf_array[0], HDIO_DRIVE_HOB_HDR_SIZE - 2); | 652 | memcpy(req_task->hob_ports, &cmd.tf_array[0], |
649 | memcpy(req_task->io_ports, &args.tf_array[6], HDIO_DRIVE_TASK_HDR_SIZE); | 653 | HDIO_DRIVE_HOB_HDR_SIZE - 2); |
654 | memcpy(req_task->io_ports, &cmd.tf_array[6], | ||
655 | HDIO_DRIVE_TASK_HDR_SIZE); | ||
650 | 656 | ||
651 | if ((args.ftf_flags & IDE_FTFLAG_SET_IN_FLAGS) && | 657 | if ((cmd.ftf_flags & IDE_FTFLAG_SET_IN_FLAGS) && |
652 | req_task->in_flags.all == 0) { | 658 | req_task->in_flags.all == 0) { |
653 | req_task->in_flags.all = IDE_TASKFILE_STD_IN_FLAGS; | 659 | req_task->in_flags.all = IDE_TASKFILE_STD_IN_FLAGS; |
654 | if (drive->dev_flags & IDE_DFLAG_LBA48) | 660 | if (drive->dev_flags & IDE_DFLAG_LBA48) |
diff --git a/drivers/ide/ns87415.c b/drivers/ide/ns87415.c index 159eb39c7932..d93c80016326 100644 --- a/drivers/ide/ns87415.c +++ b/drivers/ide/ns87415.c | |||
@@ -61,12 +61,12 @@ static u8 superio_dma_sff_read_status(ide_hwif_t *hwif) | |||
61 | return superio_ide_inb(hwif->dma_base + ATA_DMA_STATUS); | 61 | return superio_ide_inb(hwif->dma_base + ATA_DMA_STATUS); |
62 | } | 62 | } |
63 | 63 | ||
64 | static void superio_tf_read(ide_drive_t *drive, ide_task_t *task) | 64 | static void superio_tf_read(ide_drive_t *drive, struct ide_cmd *cmd) |
65 | { | 65 | { |
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 = &cmd->tf; |
68 | 68 | ||
69 | if (task->ftf_flags & IDE_FTFLAG_IN_DATA) { | 69 | if (cmd->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; |
@@ -76,31 +76,31 @@ static void superio_tf_read(ide_drive_t *drive, ide_task_t *task) | |||
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 & ~0x80, io_ports->ctl_addr); | 77 | outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); |
78 | 78 | ||
79 | if (task->tf_flags & IDE_TFLAG_IN_FEATURE) | 79 | if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) |
80 | tf->feature = inb(io_ports->feature_addr); | 80 | tf->feature = inb(io_ports->feature_addr); |
81 | if (task->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 (task->tf_flags & IDE_TFLAG_IN_LBAL) | 83 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) |
84 | tf->lbal = inb(io_ports->lbal_addr); | 84 | tf->lbal = inb(io_ports->lbal_addr); |
85 | if (task->tf_flags & IDE_TFLAG_IN_LBAM) | 85 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAM) |
86 | tf->lbam = inb(io_ports->lbam_addr); | 86 | tf->lbam = inb(io_ports->lbam_addr); |
87 | if (task->tf_flags & IDE_TFLAG_IN_LBAH) | 87 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAH) |
88 | tf->lbah = inb(io_ports->lbah_addr); | 88 | tf->lbah = inb(io_ports->lbah_addr); |
89 | if (task->tf_flags & IDE_TFLAG_IN_DEVICE) | 89 | if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE) |
90 | tf->device = superio_ide_inb(io_ports->device_addr); | 90 | tf->device = superio_ide_inb(io_ports->device_addr); |
91 | 91 | ||
92 | if (task->tf_flags & IDE_TFLAG_LBA48) { | 92 | if (cmd->tf_flags & IDE_TFLAG_LBA48) { |
93 | outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); | 93 | outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); |
94 | 94 | ||
95 | if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) | 95 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) |
96 | tf->hob_feature = inb(io_ports->feature_addr); | 96 | tf->hob_feature = inb(io_ports->feature_addr); |
97 | if (task->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 (task->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 (task->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 (task->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 | } |
diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c index 82929c725d82..d6336753bd2c 100644 --- a/drivers/ide/scc_pata.c +++ b/drivers/ide/scc_pata.c | |||
@@ -666,52 +666,52 @@ static int __devinit init_setup_scc(struct pci_dev *dev, | |||
666 | return rc; | 666 | return rc; |
667 | } | 667 | } |
668 | 668 | ||
669 | static void scc_tf_load(ide_drive_t *drive, ide_task_t *task) | 669 | static void scc_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) |
670 | { | 670 | { |
671 | struct ide_io_ports *io_ports = &drive->hwif->io_ports; | 671 | struct ide_io_ports *io_ports = &drive->hwif->io_ports; |
672 | struct ide_taskfile *tf = &task->tf; | 672 | struct ide_taskfile *tf = &cmd->tf; |
673 | u8 HIHI = (task->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; | 673 | u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; |
674 | 674 | ||
675 | if (task->ftf_flags & IDE_FTFLAG_FLAGGED) | 675 | if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED) |
676 | HIHI = 0xFF; | 676 | HIHI = 0xFF; |
677 | 677 | ||
678 | if (task->ftf_flags & IDE_FTFLAG_OUT_DATA) | 678 | if (cmd->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 | ||
682 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) | 682 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) |
683 | scc_ide_outb(tf->hob_feature, io_ports->feature_addr); | 683 | scc_ide_outb(tf->hob_feature, io_ports->feature_addr); |
684 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) | 684 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) |
685 | scc_ide_outb(tf->hob_nsect, io_ports->nsect_addr); | 685 | scc_ide_outb(tf->hob_nsect, io_ports->nsect_addr); |
686 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) | 686 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) |
687 | scc_ide_outb(tf->hob_lbal, io_ports->lbal_addr); | 687 | scc_ide_outb(tf->hob_lbal, io_ports->lbal_addr); |
688 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) | 688 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) |
689 | scc_ide_outb(tf->hob_lbam, io_ports->lbam_addr); | 689 | scc_ide_outb(tf->hob_lbam, io_ports->lbam_addr); |
690 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) | 690 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) |
691 | scc_ide_outb(tf->hob_lbah, io_ports->lbah_addr); | 691 | scc_ide_outb(tf->hob_lbah, io_ports->lbah_addr); |
692 | 692 | ||
693 | if (task->tf_flags & IDE_TFLAG_OUT_FEATURE) | 693 | if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE) |
694 | scc_ide_outb(tf->feature, io_ports->feature_addr); | 694 | scc_ide_outb(tf->feature, io_ports->feature_addr); |
695 | if (task->tf_flags & IDE_TFLAG_OUT_NSECT) | 695 | if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT) |
696 | scc_ide_outb(tf->nsect, io_ports->nsect_addr); | 696 | scc_ide_outb(tf->nsect, io_ports->nsect_addr); |
697 | if (task->tf_flags & IDE_TFLAG_OUT_LBAL) | 697 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL) |
698 | scc_ide_outb(tf->lbal, io_ports->lbal_addr); | 698 | scc_ide_outb(tf->lbal, io_ports->lbal_addr); |
699 | if (task->tf_flags & IDE_TFLAG_OUT_LBAM) | 699 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM) |
700 | scc_ide_outb(tf->lbam, io_ports->lbam_addr); | 700 | scc_ide_outb(tf->lbam, io_ports->lbam_addr); |
701 | if (task->tf_flags & IDE_TFLAG_OUT_LBAH) | 701 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH) |
702 | scc_ide_outb(tf->lbah, io_ports->lbah_addr); | 702 | scc_ide_outb(tf->lbah, io_ports->lbah_addr); |
703 | 703 | ||
704 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) | 704 | if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE) |
705 | scc_ide_outb((tf->device & HIHI) | drive->select, | 705 | scc_ide_outb((tf->device & HIHI) | drive->select, |
706 | io_ports->device_addr); | 706 | io_ports->device_addr); |
707 | } | 707 | } |
708 | 708 | ||
709 | static void scc_tf_read(ide_drive_t *drive, ide_task_t *task) | 709 | static void scc_tf_read(ide_drive_t *drive, struct ide_cmd *cmd) |
710 | { | 710 | { |
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 = &cmd->tf; |
713 | 713 | ||
714 | if (task->ftf_flags & IDE_FTFLAG_IN_DATA) { | 714 | if (cmd->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; |
@@ -721,31 +721,31 @@ static void scc_tf_read(ide_drive_t *drive, ide_task_t *task) | |||
721 | /* be sure we're looking at the low order bits */ | 721 | /* be sure we're looking at the low order bits */ |
722 | scc_ide_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); | 722 | scc_ide_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); |
723 | 723 | ||
724 | if (task->tf_flags & IDE_TFLAG_IN_FEATURE) | 724 | if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) |
725 | tf->feature = scc_ide_inb(io_ports->feature_addr); | 725 | tf->feature = scc_ide_inb(io_ports->feature_addr); |
726 | if (task->tf_flags & IDE_TFLAG_IN_NSECT) | 726 | if (cmd->tf_flags & IDE_TFLAG_IN_NSECT) |
727 | tf->nsect = scc_ide_inb(io_ports->nsect_addr); | 727 | tf->nsect = scc_ide_inb(io_ports->nsect_addr); |
728 | if (task->tf_flags & IDE_TFLAG_IN_LBAL) | 728 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) |
729 | tf->lbal = scc_ide_inb(io_ports->lbal_addr); | 729 | tf->lbal = scc_ide_inb(io_ports->lbal_addr); |
730 | if (task->tf_flags & IDE_TFLAG_IN_LBAM) | 730 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAM) |
731 | tf->lbam = scc_ide_inb(io_ports->lbam_addr); | 731 | tf->lbam = scc_ide_inb(io_ports->lbam_addr); |
732 | if (task->tf_flags & IDE_TFLAG_IN_LBAH) | 732 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAH) |
733 | tf->lbah = scc_ide_inb(io_ports->lbah_addr); | 733 | tf->lbah = scc_ide_inb(io_ports->lbah_addr); |
734 | if (task->tf_flags & IDE_TFLAG_IN_DEVICE) | 734 | if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE) |
735 | tf->device = scc_ide_inb(io_ports->device_addr); | 735 | tf->device = scc_ide_inb(io_ports->device_addr); |
736 | 736 | ||
737 | if (task->tf_flags & IDE_TFLAG_LBA48) { | 737 | if (cmd->tf_flags & IDE_TFLAG_LBA48) { |
738 | scc_ide_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); | 738 | scc_ide_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); |
739 | 739 | ||
740 | if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) | 740 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) |
741 | tf->hob_feature = scc_ide_inb(io_ports->feature_addr); | 741 | tf->hob_feature = scc_ide_inb(io_ports->feature_addr); |
742 | if (task->tf_flags & IDE_TFLAG_IN_HOB_NSECT) | 742 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT) |
743 | tf->hob_nsect = scc_ide_inb(io_ports->nsect_addr); | 743 | tf->hob_nsect = scc_ide_inb(io_ports->nsect_addr); |
744 | if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAL) | 744 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL) |
745 | tf->hob_lbal = scc_ide_inb(io_ports->lbal_addr); | 745 | tf->hob_lbal = scc_ide_inb(io_ports->lbal_addr); |
746 | if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAM) | 746 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM) |
747 | tf->hob_lbam = scc_ide_inb(io_ports->lbam_addr); | 747 | tf->hob_lbam = scc_ide_inb(io_ports->lbam_addr); |
748 | if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAH) | 748 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH) |
749 | tf->hob_lbah = scc_ide_inb(io_ports->lbah_addr); | 749 | tf->hob_lbah = scc_ide_inb(io_ports->lbah_addr); |
750 | } | 750 | } |
751 | } | 751 | } |
diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c index 6b51e0c58af7..947596d3620c 100644 --- a/drivers/ide/tx4938ide.c +++ b/drivers/ide/tx4938ide.c | |||
@@ -82,57 +82,57 @@ static void tx4938ide_outb(u8 value, unsigned long port) | |||
82 | __raw_writeb(value, (void __iomem *)port); | 82 | __raw_writeb(value, (void __iomem *)port); |
83 | } | 83 | } |
84 | 84 | ||
85 | static void tx4938ide_tf_load(ide_drive_t *drive, ide_task_t *task) | 85 | static void tx4938ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) |
86 | { | 86 | { |
87 | ide_hwif_t *hwif = drive->hwif; | 87 | ide_hwif_t *hwif = drive->hwif; |
88 | struct ide_io_ports *io_ports = &hwif->io_ports; | 88 | struct ide_io_ports *io_ports = &hwif->io_ports; |
89 | struct ide_taskfile *tf = &task->tf; | 89 | struct ide_taskfile *tf = &cmd->tf; |
90 | u8 HIHI = task->tf_flags & IDE_TFLAG_LBA48 ? 0xE0 : 0xEF; | 90 | u8 HIHI = cmd->tf_flags & IDE_TFLAG_LBA48 ? 0xE0 : 0xEF; |
91 | 91 | ||
92 | if (task->ftf_flags & IDE_FTFLAG_FLAGGED) | 92 | if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED) |
93 | HIHI = 0xFF; | 93 | HIHI = 0xFF; |
94 | 94 | ||
95 | if (task->ftf_flags & IDE_FTFLAG_OUT_DATA) { | 95 | if (cmd->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 */ |
99 | __raw_writew(data, (void __iomem *)io_ports->data_addr); | 99 | __raw_writew(data, (void __iomem *)io_ports->data_addr); |
100 | } | 100 | } |
101 | 101 | ||
102 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) | 102 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) |
103 | tx4938ide_outb(tf->hob_feature, io_ports->feature_addr); | 103 | tx4938ide_outb(tf->hob_feature, io_ports->feature_addr); |
104 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) | 104 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) |
105 | tx4938ide_outb(tf->hob_nsect, io_ports->nsect_addr); | 105 | tx4938ide_outb(tf->hob_nsect, io_ports->nsect_addr); |
106 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) | 106 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) |
107 | tx4938ide_outb(tf->hob_lbal, io_ports->lbal_addr); | 107 | tx4938ide_outb(tf->hob_lbal, io_ports->lbal_addr); |
108 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) | 108 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) |
109 | tx4938ide_outb(tf->hob_lbam, io_ports->lbam_addr); | 109 | tx4938ide_outb(tf->hob_lbam, io_ports->lbam_addr); |
110 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) | 110 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) |
111 | tx4938ide_outb(tf->hob_lbah, io_ports->lbah_addr); | 111 | tx4938ide_outb(tf->hob_lbah, io_ports->lbah_addr); |
112 | 112 | ||
113 | if (task->tf_flags & IDE_TFLAG_OUT_FEATURE) | 113 | if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE) |
114 | tx4938ide_outb(tf->feature, io_ports->feature_addr); | 114 | tx4938ide_outb(tf->feature, io_ports->feature_addr); |
115 | if (task->tf_flags & IDE_TFLAG_OUT_NSECT) | 115 | if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT) |
116 | tx4938ide_outb(tf->nsect, io_ports->nsect_addr); | 116 | tx4938ide_outb(tf->nsect, io_ports->nsect_addr); |
117 | if (task->tf_flags & IDE_TFLAG_OUT_LBAL) | 117 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL) |
118 | tx4938ide_outb(tf->lbal, io_ports->lbal_addr); | 118 | tx4938ide_outb(tf->lbal, io_ports->lbal_addr); |
119 | if (task->tf_flags & IDE_TFLAG_OUT_LBAM) | 119 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM) |
120 | tx4938ide_outb(tf->lbam, io_ports->lbam_addr); | 120 | tx4938ide_outb(tf->lbam, io_ports->lbam_addr); |
121 | if (task->tf_flags & IDE_TFLAG_OUT_LBAH) | 121 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH) |
122 | tx4938ide_outb(tf->lbah, io_ports->lbah_addr); | 122 | tx4938ide_outb(tf->lbah, io_ports->lbah_addr); |
123 | 123 | ||
124 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) | 124 | if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE) |
125 | tx4938ide_outb((tf->device & HIHI) | drive->select, | 125 | tx4938ide_outb((tf->device & HIHI) | drive->select, |
126 | io_ports->device_addr); | 126 | io_ports->device_addr); |
127 | } | 127 | } |
128 | 128 | ||
129 | static void tx4938ide_tf_read(ide_drive_t *drive, ide_task_t *task) | 129 | static void tx4938ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd) |
130 | { | 130 | { |
131 | ide_hwif_t *hwif = drive->hwif; | 131 | ide_hwif_t *hwif = drive->hwif; |
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 = &cmd->tf; |
134 | 134 | ||
135 | if (task->ftf_flags & IDE_FTFLAG_IN_DATA) { | 135 | if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) { |
136 | u16 data; | 136 | u16 data; |
137 | 137 | ||
138 | /* no endian swap */ | 138 | /* no endian swap */ |
@@ -144,32 +144,32 @@ static void tx4938ide_tf_read(ide_drive_t *drive, ide_task_t *task) | |||
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 & ~0x80, io_ports->ctl_addr); | 145 | tx4938ide_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); |
146 | 146 | ||
147 | if (task->tf_flags & IDE_TFLAG_IN_FEATURE) | 147 | if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) |
148 | tf->feature = tx4938ide_inb(io_ports->feature_addr); | 148 | tf->feature = tx4938ide_inb(io_ports->feature_addr); |
149 | if (task->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 (task->tf_flags & IDE_TFLAG_IN_LBAL) | 151 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) |
152 | tf->lbal = tx4938ide_inb(io_ports->lbal_addr); | 152 | tf->lbal = tx4938ide_inb(io_ports->lbal_addr); |
153 | if (task->tf_flags & IDE_TFLAG_IN_LBAM) | 153 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAM) |
154 | tf->lbam = tx4938ide_inb(io_ports->lbam_addr); | 154 | tf->lbam = tx4938ide_inb(io_ports->lbam_addr); |
155 | if (task->tf_flags & IDE_TFLAG_IN_LBAH) | 155 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAH) |
156 | tf->lbah = tx4938ide_inb(io_ports->lbah_addr); | 156 | tf->lbah = tx4938ide_inb(io_ports->lbah_addr); |
157 | if (task->tf_flags & IDE_TFLAG_IN_DEVICE) | 157 | if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE) |
158 | tf->device = tx4938ide_inb(io_ports->device_addr); | 158 | tf->device = tx4938ide_inb(io_ports->device_addr); |
159 | 159 | ||
160 | if (task->tf_flags & IDE_TFLAG_LBA48) { | 160 | if (cmd->tf_flags & IDE_TFLAG_LBA48) { |
161 | tx4938ide_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); | 161 | tx4938ide_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); |
162 | 162 | ||
163 | if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) | 163 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) |
164 | tf->hob_feature = | 164 | tf->hob_feature = |
165 | tx4938ide_inb(io_ports->feature_addr); | 165 | tx4938ide_inb(io_ports->feature_addr); |
166 | if (task->tf_flags & IDE_TFLAG_IN_HOB_NSECT) | 166 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT) |
167 | tf->hob_nsect = tx4938ide_inb(io_ports->nsect_addr); | 167 | tf->hob_nsect = tx4938ide_inb(io_ports->nsect_addr); |
168 | if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAL) | 168 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL) |
169 | tf->hob_lbal = tx4938ide_inb(io_ports->lbal_addr); | 169 | tf->hob_lbal = tx4938ide_inb(io_ports->lbal_addr); |
170 | if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAM) | 170 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM) |
171 | tf->hob_lbam = tx4938ide_inb(io_ports->lbam_addr); | 171 | tf->hob_lbam = tx4938ide_inb(io_ports->lbam_addr); |
172 | if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAH) | 172 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH) |
173 | tf->hob_lbah = tx4938ide_inb(io_ports->lbah_addr); | 173 | tf->hob_lbah = tx4938ide_inb(io_ports->lbah_addr); |
174 | } | 174 | } |
175 | } | 175 | } |
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c index ee86688d8461..bf11791476f0 100644 --- a/drivers/ide/tx4939ide.c +++ b/drivers/ide/tx4939ide.c | |||
@@ -435,7 +435,7 @@ static int tx4939ide_init_dma(ide_hwif_t *hwif, const struct ide_port_info *d) | |||
435 | return ide_allocate_dma_engine(hwif); | 435 | return ide_allocate_dma_engine(hwif); |
436 | } | 436 | } |
437 | 437 | ||
438 | static void tx4939ide_tf_load_fixup(ide_drive_t *drive, ide_task_t *task) | 438 | static void tx4939ide_tf_load_fixup(ide_drive_t *drive) |
439 | { | 439 | { |
440 | ide_hwif_t *hwif = drive->hwif; | 440 | ide_hwif_t *hwif = drive->hwif; |
441 | void __iomem *base = TX4939IDE_BASE(hwif); | 441 | void __iomem *base = TX4939IDE_BASE(hwif); |
@@ -463,59 +463,59 @@ static void tx4939ide_outb(u8 value, unsigned long port) | |||
463 | __raw_writeb(value, (void __iomem *)port); | 463 | __raw_writeb(value, (void __iomem *)port); |
464 | } | 464 | } |
465 | 465 | ||
466 | static void tx4939ide_tf_load(ide_drive_t *drive, ide_task_t *task) | 466 | static void tx4939ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) |
467 | { | 467 | { |
468 | ide_hwif_t *hwif = drive->hwif; | 468 | ide_hwif_t *hwif = drive->hwif; |
469 | struct ide_io_ports *io_ports = &hwif->io_ports; | 469 | struct ide_io_ports *io_ports = &hwif->io_ports; |
470 | struct ide_taskfile *tf = &task->tf; | 470 | struct ide_taskfile *tf = &cmd->tf; |
471 | u8 HIHI = task->tf_flags & IDE_TFLAG_LBA48 ? 0xE0 : 0xEF; | 471 | u8 HIHI = cmd->tf_flags & IDE_TFLAG_LBA48 ? 0xE0 : 0xEF; |
472 | 472 | ||
473 | if (task->ftf_flags & IDE_FTFLAG_FLAGGED) | 473 | if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED) |
474 | HIHI = 0xFF; | 474 | HIHI = 0xFF; |
475 | 475 | ||
476 | if (task->ftf_flags & IDE_FTFLAG_OUT_DATA) { | 476 | if (cmd->ftf_flags & IDE_FTFLAG_OUT_DATA) { |
477 | u16 data = (tf->hob_data << 8) | tf->data; | 477 | u16 data = (tf->hob_data << 8) | tf->data; |
478 | 478 | ||
479 | /* no endian swap */ | 479 | /* no endian swap */ |
480 | __raw_writew(data, (void __iomem *)io_ports->data_addr); | 480 | __raw_writew(data, (void __iomem *)io_ports->data_addr); |
481 | } | 481 | } |
482 | 482 | ||
483 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) | 483 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE) |
484 | tx4939ide_outb(tf->hob_feature, io_ports->feature_addr); | 484 | tx4939ide_outb(tf->hob_feature, io_ports->feature_addr); |
485 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) | 485 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT) |
486 | tx4939ide_outb(tf->hob_nsect, io_ports->nsect_addr); | 486 | tx4939ide_outb(tf->hob_nsect, io_ports->nsect_addr); |
487 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) | 487 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL) |
488 | tx4939ide_outb(tf->hob_lbal, io_ports->lbal_addr); | 488 | tx4939ide_outb(tf->hob_lbal, io_ports->lbal_addr); |
489 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) | 489 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM) |
490 | tx4939ide_outb(tf->hob_lbam, io_ports->lbam_addr); | 490 | tx4939ide_outb(tf->hob_lbam, io_ports->lbam_addr); |
491 | if (task->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) | 491 | if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH) |
492 | tx4939ide_outb(tf->hob_lbah, io_ports->lbah_addr); | 492 | tx4939ide_outb(tf->hob_lbah, io_ports->lbah_addr); |
493 | 493 | ||
494 | if (task->tf_flags & IDE_TFLAG_OUT_FEATURE) | 494 | if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE) |
495 | tx4939ide_outb(tf->feature, io_ports->feature_addr); | 495 | tx4939ide_outb(tf->feature, io_ports->feature_addr); |
496 | if (task->tf_flags & IDE_TFLAG_OUT_NSECT) | 496 | if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT) |
497 | tx4939ide_outb(tf->nsect, io_ports->nsect_addr); | 497 | tx4939ide_outb(tf->nsect, io_ports->nsect_addr); |
498 | if (task->tf_flags & IDE_TFLAG_OUT_LBAL) | 498 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL) |
499 | tx4939ide_outb(tf->lbal, io_ports->lbal_addr); | 499 | tx4939ide_outb(tf->lbal, io_ports->lbal_addr); |
500 | if (task->tf_flags & IDE_TFLAG_OUT_LBAM) | 500 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM) |
501 | tx4939ide_outb(tf->lbam, io_ports->lbam_addr); | 501 | tx4939ide_outb(tf->lbam, io_ports->lbam_addr); |
502 | if (task->tf_flags & IDE_TFLAG_OUT_LBAH) | 502 | if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH) |
503 | tx4939ide_outb(tf->lbah, io_ports->lbah_addr); | 503 | tx4939ide_outb(tf->lbah, io_ports->lbah_addr); |
504 | 504 | ||
505 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) { | 505 | if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE) { |
506 | tx4939ide_outb((tf->device & HIHI) | drive->select, | 506 | tx4939ide_outb((tf->device & HIHI) | drive->select, |
507 | io_ports->device_addr); | 507 | io_ports->device_addr); |
508 | tx4939ide_tf_load_fixup(drive, task); | 508 | tx4939ide_tf_load_fixup(drive); |
509 | } | 509 | } |
510 | } | 510 | } |
511 | 511 | ||
512 | static void tx4939ide_tf_read(ide_drive_t *drive, ide_task_t *task) | 512 | static void tx4939ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd) |
513 | { | 513 | { |
514 | ide_hwif_t *hwif = drive->hwif; | 514 | ide_hwif_t *hwif = drive->hwif; |
515 | struct ide_io_ports *io_ports = &hwif->io_ports; | 515 | struct ide_io_ports *io_ports = &hwif->io_ports; |
516 | struct ide_taskfile *tf = &task->tf; | 516 | struct ide_taskfile *tf = &cmd->tf; |
517 | 517 | ||
518 | if (task->ftf_flags & IDE_FTFLAG_IN_DATA) { | 518 | if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) { |
519 | u16 data; | 519 | u16 data; |
520 | 520 | ||
521 | /* no endian swap */ | 521 | /* no endian swap */ |
@@ -527,32 +527,32 @@ static void tx4939ide_tf_read(ide_drive_t *drive, ide_task_t *task) | |||
527 | /* be sure we're looking at the low order bits */ | 527 | /* be sure we're looking at the low order bits */ |
528 | tx4939ide_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); | 528 | tx4939ide_outb(ATA_DEVCTL_OBS & ~0x80, io_ports->ctl_addr); |
529 | 529 | ||
530 | if (task->tf_flags & IDE_TFLAG_IN_FEATURE) | 530 | if (cmd->tf_flags & IDE_TFLAG_IN_FEATURE) |
531 | tf->feature = tx4939ide_inb(io_ports->feature_addr); | 531 | tf->feature = tx4939ide_inb(io_ports->feature_addr); |
532 | if (task->tf_flags & IDE_TFLAG_IN_NSECT) | 532 | if (cmd->tf_flags & IDE_TFLAG_IN_NSECT) |
533 | tf->nsect = tx4939ide_inb(io_ports->nsect_addr); | 533 | tf->nsect = tx4939ide_inb(io_ports->nsect_addr); |
534 | if (task->tf_flags & IDE_TFLAG_IN_LBAL) | 534 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAL) |
535 | tf->lbal = tx4939ide_inb(io_ports->lbal_addr); | 535 | tf->lbal = tx4939ide_inb(io_ports->lbal_addr); |
536 | if (task->tf_flags & IDE_TFLAG_IN_LBAM) | 536 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAM) |
537 | tf->lbam = tx4939ide_inb(io_ports->lbam_addr); | 537 | tf->lbam = tx4939ide_inb(io_ports->lbam_addr); |
538 | if (task->tf_flags & IDE_TFLAG_IN_LBAH) | 538 | if (cmd->tf_flags & IDE_TFLAG_IN_LBAH) |
539 | tf->lbah = tx4939ide_inb(io_ports->lbah_addr); | 539 | tf->lbah = tx4939ide_inb(io_ports->lbah_addr); |
540 | if (task->tf_flags & IDE_TFLAG_IN_DEVICE) | 540 | if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE) |
541 | tf->device = tx4939ide_inb(io_ports->device_addr); | 541 | tf->device = tx4939ide_inb(io_ports->device_addr); |
542 | 542 | ||
543 | if (task->tf_flags & IDE_TFLAG_LBA48) { | 543 | if (cmd->tf_flags & IDE_TFLAG_LBA48) { |
544 | tx4939ide_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); | 544 | tx4939ide_outb(ATA_DEVCTL_OBS | 0x80, io_ports->ctl_addr); |
545 | 545 | ||
546 | if (task->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) | 546 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_FEATURE) |
547 | tf->hob_feature = | 547 | tf->hob_feature = |
548 | tx4939ide_inb(io_ports->feature_addr); | 548 | tx4939ide_inb(io_ports->feature_addr); |
549 | if (task->tf_flags & IDE_TFLAG_IN_HOB_NSECT) | 549 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT) |
550 | tf->hob_nsect = tx4939ide_inb(io_ports->nsect_addr); | 550 | tf->hob_nsect = tx4939ide_inb(io_ports->nsect_addr); |
551 | if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAL) | 551 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL) |
552 | tf->hob_lbal = tx4939ide_inb(io_ports->lbal_addr); | 552 | tf->hob_lbal = tx4939ide_inb(io_ports->lbal_addr); |
553 | if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAM) | 553 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM) |
554 | tf->hob_lbam = tx4939ide_inb(io_ports->lbam_addr); | 554 | tf->hob_lbam = tx4939ide_inb(io_ports->lbam_addr); |
555 | if (task->tf_flags & IDE_TFLAG_IN_HOB_LBAH) | 555 | if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH) |
556 | tf->hob_lbah = tx4939ide_inb(io_ports->lbah_addr); | 556 | tf->hob_lbah = tx4939ide_inb(io_ports->lbah_addr); |
557 | } | 557 | } |
558 | } | 558 | } |
@@ -599,11 +599,12 @@ static const struct ide_tp_ops tx4939ide_tp_ops = { | |||
599 | 599 | ||
600 | #else /* __LITTLE_ENDIAN */ | 600 | #else /* __LITTLE_ENDIAN */ |
601 | 601 | ||
602 | static void tx4939ide_tf_load(ide_drive_t *drive, ide_task_t *task) | 602 | static void tx4939ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) |
603 | { | 603 | { |
604 | ide_tf_load(drive, task); | 604 | ide_tf_load(drive, cmd); |
605 | if (task->tf_flags & IDE_TFLAG_OUT_DEVICE) | 605 | |
606 | tx4939ide_tf_load_fixup(drive, task); | 606 | if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE) |
607 | tx4939ide_tf_load_fixup(drive); | ||
607 | } | 608 | } |
608 | 609 | ||
609 | static const struct ide_tp_ops tx4939ide_tp_ops = { | 610 | static const struct ide_tp_ops tx4939ide_tp_ops = { |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 2ee236d1f3ac..f0e3618c7257 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -295,7 +295,7 @@ enum { | |||
295 | IDE_TFLAG_IN_DEVICE, | 295 | IDE_TFLAG_IN_DEVICE, |
296 | /* force 16-bit I/O operations */ | 296 | /* force 16-bit I/O operations */ |
297 | IDE_TFLAG_IO_16BIT = (1 << 26), | 297 | IDE_TFLAG_IO_16BIT = (1 << 26), |
298 | /* ide_task_t was allocated using kmalloc() */ | 298 | /* struct ide_cmd was allocated using kmalloc() */ |
299 | IDE_TFLAG_DYN = (1 << 27), | 299 | IDE_TFLAG_DYN = (1 << 27), |
300 | }; | 300 | }; |
301 | 301 | ||
@@ -335,7 +335,7 @@ struct ide_taskfile { | |||
335 | }; | 335 | }; |
336 | }; | 336 | }; |
337 | 337 | ||
338 | typedef struct ide_task_s { | 338 | struct ide_cmd { |
339 | union { | 339 | union { |
340 | struct ide_taskfile tf; | 340 | struct ide_taskfile tf; |
341 | u8 tf_array[14]; | 341 | u8 tf_array[14]; |
@@ -345,7 +345,7 @@ typedef struct ide_task_s { | |||
345 | int data_phase; | 345 | int data_phase; |
346 | struct request *rq; /* copy of request */ | 346 | struct request *rq; /* copy of request */ |
347 | void *special; /* valid_t generally */ | 347 | void *special; /* valid_t generally */ |
348 | } ide_task_t; | 348 | }; |
349 | 349 | ||
350 | /* ATAPI packet command flags */ | 350 | /* ATAPI packet command flags */ |
351 | enum { | 351 | enum { |
@@ -652,8 +652,8 @@ struct ide_tp_ops { | |||
652 | 652 | ||
653 | void (*set_irq)(struct hwif_s *, int); | 653 | void (*set_irq)(struct hwif_s *, int); |
654 | 654 | ||
655 | void (*tf_load)(ide_drive_t *, struct ide_task_s *); | 655 | void (*tf_load)(ide_drive_t *, struct ide_cmd *); |
656 | void (*tf_read)(ide_drive_t *, struct ide_task_s *); | 656 | void (*tf_read)(ide_drive_t *, struct ide_cmd *); |
657 | 657 | ||
658 | void (*input_data)(ide_drive_t *, struct request *, void *, | 658 | void (*input_data)(ide_drive_t *, struct request *, void *, |
659 | unsigned int); | 659 | unsigned int); |
@@ -775,7 +775,7 @@ typedef struct hwif_s { | |||
775 | int orig_sg_nents; | 775 | int orig_sg_nents; |
776 | int sg_dma_direction; /* dma transfer direction */ | 776 | int sg_dma_direction; /* dma transfer direction */ |
777 | 777 | ||
778 | struct ide_task_s task; /* current command */ | 778 | struct ide_cmd cmd; /* current command */ |
779 | 779 | ||
780 | unsigned int nsect; | 780 | unsigned int nsect; |
781 | unsigned int nleft; | 781 | unsigned int nleft; |
@@ -1161,7 +1161,7 @@ extern ide_startstop_t ide_do_reset (ide_drive_t *); | |||
1161 | extern int ide_devset_execute(ide_drive_t *drive, | 1161 | extern int ide_devset_execute(ide_drive_t *drive, |
1162 | const struct ide_devset *setting, int arg); | 1162 | const struct ide_devset *setting, int arg); |
1163 | 1163 | ||
1164 | void ide_complete_task(ide_drive_t *, ide_task_t *, u8, u8); | 1164 | void ide_complete_cmd(ide_drive_t *, struct ide_cmd *, u8, u8); |
1165 | void ide_complete_rq(ide_drive_t *, u8); | 1165 | void ide_complete_rq(ide_drive_t *, u8); |
1166 | 1166 | ||
1167 | void ide_tf_dump(const char *, struct ide_taskfile *); | 1167 | void ide_tf_dump(const char *, struct ide_taskfile *); |
@@ -1172,8 +1172,8 @@ u8 ide_read_altstatus(ide_hwif_t *); | |||
1172 | 1172 | ||
1173 | void ide_set_irq(ide_hwif_t *, int); | 1173 | void ide_set_irq(ide_hwif_t *, int); |
1174 | 1174 | ||
1175 | void ide_tf_load(ide_drive_t *, ide_task_t *); | 1175 | void ide_tf_load(ide_drive_t *, struct ide_cmd *); |
1176 | void ide_tf_read(ide_drive_t *, ide_task_t *); | 1176 | void ide_tf_read(ide_drive_t *, struct ide_cmd *); |
1177 | 1177 | ||
1178 | void ide_input_data(ide_drive_t *, struct request *, void *, unsigned int); | 1178 | void ide_input_data(ide_drive_t *, struct request *, void *, unsigned int); |
1179 | void ide_output_data(ide_drive_t *, struct request *, void *, unsigned int); | 1179 | void ide_output_data(ide_drive_t *, struct request *, void *, unsigned int); |
@@ -1224,14 +1224,14 @@ int ide_cd_get_xferlen(struct request *); | |||
1224 | 1224 | ||
1225 | ide_startstop_t ide_issue_pc(ide_drive_t *); | 1225 | ide_startstop_t ide_issue_pc(ide_drive_t *); |
1226 | 1226 | ||
1227 | ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *); | 1227 | ide_startstop_t do_rw_taskfile(ide_drive_t *, struct ide_cmd *); |
1228 | 1228 | ||
1229 | void task_end_request(ide_drive_t *, struct request *, u8); | 1229 | void task_end_request(ide_drive_t *, struct request *, u8); |
1230 | 1230 | ||
1231 | int ide_raw_taskfile(ide_drive_t *, ide_task_t *, u8 *, u16); | 1231 | int ide_raw_taskfile(ide_drive_t *, struct ide_cmd *, u8 *, u16); |
1232 | int ide_no_data_taskfile(ide_drive_t *, ide_task_t *); | 1232 | int ide_no_data_taskfile(ide_drive_t *, struct ide_cmd *); |
1233 | 1233 | ||
1234 | int ide_taskfile_ioctl(ide_drive_t *, unsigned int, unsigned long); | 1234 | int ide_taskfile_ioctl(ide_drive_t *, unsigned long); |
1235 | 1235 | ||
1236 | int ide_dev_read_id(ide_drive_t *, u8, u16 *); | 1236 | int ide_dev_read_id(ide_drive_t *, u8, u16 *); |
1237 | 1237 | ||