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 /drivers/ide/ide-taskfile.c | |
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>
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r-- | drivers/ide/ide-taskfile.c | 148 |
1 files changed, 77 insertions, 71 deletions
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) |