diff options
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r-- | drivers/ide/ide-taskfile.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 243421ce40d0..dc84f8bde52a 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -47,7 +47,8 @@ int taskfile_lib_get_identify (ide_drive_t *drive, u8 *buf) | |||
47 | cmd.tf.command = ATA_CMD_ID_ATA; | 47 | cmd.tf.command = ATA_CMD_ID_ATA; |
48 | else | 48 | else |
49 | cmd.tf.command = ATA_CMD_ID_ATAPI; | 49 | cmd.tf.command = ATA_CMD_ID_ATAPI; |
50 | cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 50 | cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE; |
51 | cmd.valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE; | ||
51 | cmd.protocol = ATA_PROT_PIO; | 52 | cmd.protocol = ATA_PROT_PIO; |
52 | 53 | ||
53 | return ide_raw_taskfile(drive, &cmd, buf, 1); | 54 | return ide_raw_taskfile(drive, &cmd, buf, 1); |
@@ -494,11 +495,14 @@ int ide_taskfile_ioctl(ide_drive_t *drive, unsigned long arg) | |||
494 | memcpy(&cmd.tf_array[6], req_task->io_ports, | 495 | memcpy(&cmd.tf_array[6], req_task->io_ports, |
495 | HDIO_DRIVE_TASK_HDR_SIZE); | 496 | HDIO_DRIVE_TASK_HDR_SIZE); |
496 | 497 | ||
497 | cmd.tf_flags = IDE_TFLAG_IO_16BIT | IDE_TFLAG_DEVICE | | 498 | cmd.valid.out.tf = IDE_VALID_DEVICE; |
498 | IDE_TFLAG_IN_TF; | 499 | cmd.valid.in.tf = IDE_VALID_DEVICE | IDE_VALID_IN_TF; |
500 | cmd.tf_flags = IDE_TFLAG_IO_16BIT; | ||
499 | 501 | ||
500 | if (drive->dev_flags & IDE_DFLAG_LBA48) | 502 | if (drive->dev_flags & IDE_DFLAG_LBA48) { |
501 | cmd.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_IN_HOB); | 503 | cmd.tf_flags |= IDE_TFLAG_LBA48; |
504 | cmd.valid.in.hob = IDE_VALID_IN_HOB; | ||
505 | } | ||
502 | 506 | ||
503 | if (req_task->out_flags.all) { | 507 | if (req_task->out_flags.all) { |
504 | cmd.ftf_flags |= IDE_FTFLAG_FLAGGED; | 508 | cmd.ftf_flags |= IDE_FTFLAG_FLAGGED; |
@@ -507,28 +511,28 @@ int ide_taskfile_ioctl(ide_drive_t *drive, unsigned long arg) | |||
507 | cmd.ftf_flags |= IDE_FTFLAG_OUT_DATA; | 511 | cmd.ftf_flags |= IDE_FTFLAG_OUT_DATA; |
508 | 512 | ||
509 | if (req_task->out_flags.b.nsector_hob) | 513 | if (req_task->out_flags.b.nsector_hob) |
510 | cmd.tf_flags |= IDE_TFLAG_OUT_HOB_NSECT; | 514 | cmd.valid.out.hob |= IDE_VALID_NSECT; |
511 | if (req_task->out_flags.b.sector_hob) | 515 | if (req_task->out_flags.b.sector_hob) |
512 | cmd.tf_flags |= IDE_TFLAG_OUT_HOB_LBAL; | 516 | cmd.valid.out.hob |= IDE_VALID_LBAL; |
513 | if (req_task->out_flags.b.lcyl_hob) | 517 | if (req_task->out_flags.b.lcyl_hob) |
514 | cmd.tf_flags |= IDE_TFLAG_OUT_HOB_LBAM; | 518 | cmd.valid.out.hob |= IDE_VALID_LBAM; |
515 | if (req_task->out_flags.b.hcyl_hob) | 519 | if (req_task->out_flags.b.hcyl_hob) |
516 | cmd.tf_flags |= IDE_TFLAG_OUT_HOB_LBAH; | 520 | cmd.valid.out.hob |= IDE_VALID_LBAH; |
517 | 521 | ||
518 | if (req_task->out_flags.b.error_feature) | 522 | if (req_task->out_flags.b.error_feature) |
519 | cmd.tf_flags |= IDE_TFLAG_OUT_FEATURE; | 523 | cmd.valid.out.tf |= IDE_VALID_FEATURE; |
520 | if (req_task->out_flags.b.nsector) | 524 | if (req_task->out_flags.b.nsector) |
521 | cmd.tf_flags |= IDE_TFLAG_OUT_NSECT; | 525 | cmd.valid.out.tf |= IDE_VALID_NSECT; |
522 | if (req_task->out_flags.b.sector) | 526 | if (req_task->out_flags.b.sector) |
523 | cmd.tf_flags |= IDE_TFLAG_OUT_LBAL; | 527 | cmd.valid.out.tf |= IDE_VALID_LBAL; |
524 | if (req_task->out_flags.b.lcyl) | 528 | if (req_task->out_flags.b.lcyl) |
525 | cmd.tf_flags |= IDE_TFLAG_OUT_LBAM; | 529 | cmd.valid.out.tf |= IDE_VALID_LBAM; |
526 | if (req_task->out_flags.b.hcyl) | 530 | if (req_task->out_flags.b.hcyl) |
527 | cmd.tf_flags |= IDE_TFLAG_OUT_LBAH; | 531 | cmd.valid.out.tf |= IDE_VALID_LBAH; |
528 | } else { | 532 | } else { |
529 | cmd.tf_flags |= IDE_TFLAG_OUT_TF; | 533 | cmd.valid.out.tf |= IDE_VALID_OUT_TF; |
530 | if (cmd.tf_flags & IDE_TFLAG_LBA48) | 534 | if (cmd.tf_flags & IDE_TFLAG_LBA48) |
531 | cmd.tf_flags |= IDE_TFLAG_OUT_HOB; | 535 | cmd.valid.out.hob |= IDE_VALID_OUT_HOB; |
532 | } | 536 | } |
533 | 537 | ||
534 | if (req_task->in_flags.b.data) | 538 | if (req_task->in_flags.b.data) |