diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-04-08 08:13:02 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-04-08 08:13:02 -0400 |
commit | 745483f10c6cefb303007c6873e2bfce54efa8ed (patch) | |
tree | 9dc9dca95f017edf279bf3e2d5ec3d07481e75da /drivers/ide/scc_pata.c | |
parent | 60f85019c6c8c1aebf3485a313e0da094bc95d07 (diff) |
ide: simplify 'struct ide_taskfile'
Make 'struct ide_taskfile' cover only 8 register values and thus put two such
fields ('tf' and 'hob') into 'struct ide_cmd', dropping unnecessary 'tf_array'
field from it.
This required changing the prototype of ide_get_lba_addr() and ide_tf_dump().
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
[bart: fix setting of ATA_LBA bit for LBA48 commands in __ide_do_rw_disk()]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/scc_pata.c')
-rw-r--r-- | drivers/ide/scc_pata.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c index 38a715e293d4..1238d5561976 100644 --- a/drivers/ide/scc_pata.c +++ b/drivers/ide/scc_pata.c | |||
@@ -648,7 +648,7 @@ static int __devinit init_setup_scc(struct pci_dev *dev, | |||
648 | static void scc_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) | 648 | static void scc_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) |
649 | { | 649 | { |
650 | struct ide_io_ports *io_ports = &drive->hwif->io_ports; | 650 | struct ide_io_ports *io_ports = &drive->hwif->io_ports; |
651 | struct ide_taskfile *tf = &cmd->tf; | 651 | struct ide_taskfile *tf = &cmd->hob; |
652 | u8 valid = cmd->valid.out.hob; | 652 | u8 valid = cmd->valid.out.hob; |
653 | u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; | 653 | u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF; |
654 | 654 | ||
@@ -656,16 +656,17 @@ static void scc_tf_load(ide_drive_t *drive, struct ide_cmd *cmd) | |||
656 | HIHI = 0xFF; | 656 | HIHI = 0xFF; |
657 | 657 | ||
658 | if (valid & IDE_VALID_FEATURE) | 658 | if (valid & IDE_VALID_FEATURE) |
659 | scc_ide_outb(tf->hob_feature, io_ports->feature_addr); | 659 | scc_ide_outb(tf->feature, io_ports->feature_addr); |
660 | if (valid & IDE_VALID_NSECT) | 660 | if (valid & IDE_VALID_NSECT) |
661 | scc_ide_outb(tf->hob_nsect, io_ports->nsect_addr); | 661 | scc_ide_outb(tf->nsect, io_ports->nsect_addr); |
662 | if (valid & IDE_VALID_LBAL) | 662 | if (valid & IDE_VALID_LBAL) |
663 | scc_ide_outb(tf->hob_lbal, io_ports->lbal_addr); | 663 | scc_ide_outb(tf->lbal, io_ports->lbal_addr); |
664 | if (valid & IDE_VALID_LBAM) | 664 | if (valid & IDE_VALID_LBAM) |
665 | scc_ide_outb(tf->hob_lbam, io_ports->lbam_addr); | 665 | scc_ide_outb(tf->lbam, io_ports->lbam_addr); |
666 | if (valid & IDE_VALID_LBAH) | 666 | if (valid & IDE_VALID_LBAH) |
667 | scc_ide_outb(tf->hob_lbah, io_ports->lbah_addr); | 667 | scc_ide_outb(tf->lbah, io_ports->lbah_addr); |
668 | 668 | ||
669 | tf = &cmd->tf; | ||
669 | valid = cmd->valid.out.tf; | 670 | valid = cmd->valid.out.tf; |
670 | 671 | ||
671 | if (valid & IDE_VALID_FEATURE) | 672 | if (valid & IDE_VALID_FEATURE) |
@@ -709,18 +710,19 @@ static void scc_tf_read(ide_drive_t *drive, struct ide_cmd *cmd) | |||
709 | if (cmd->tf_flags & IDE_TFLAG_LBA48) { | 710 | if (cmd->tf_flags & IDE_TFLAG_LBA48) { |
710 | scc_ide_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr); | 711 | scc_ide_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr); |
711 | 712 | ||
713 | tf = &cmd->hob; | ||
712 | valid = cmd->valid.in.hob; | 714 | valid = cmd->valid.in.hob; |
713 | 715 | ||
714 | if (valid & IDE_VALID_ERROR) | 716 | if (valid & IDE_VALID_ERROR) |
715 | tf->hob_error = scc_ide_inb(io_ports->feature_addr); | 717 | tf->error = scc_ide_inb(io_ports->feature_addr); |
716 | if (valid & IDE_VALID_NSECT) | 718 | if (valid & IDE_VALID_NSECT) |
717 | tf->hob_nsect = scc_ide_inb(io_ports->nsect_addr); | 719 | tf->nsect = scc_ide_inb(io_ports->nsect_addr); |
718 | if (valid & IDE_VALID_LBAL) | 720 | if (valid & IDE_VALID_LBAL) |
719 | tf->hob_lbal = scc_ide_inb(io_ports->lbal_addr); | 721 | tf->lbal = scc_ide_inb(io_ports->lbal_addr); |
720 | if (valid & IDE_VALID_LBAM) | 722 | if (valid & IDE_VALID_LBAM) |
721 | tf->hob_lbam = scc_ide_inb(io_ports->lbam_addr); | 723 | tf->lbam = scc_ide_inb(io_ports->lbam_addr); |
722 | if (valid & IDE_VALID_LBAH) | 724 | if (valid & IDE_VALID_LBAH) |
723 | tf->hob_lbah = scc_ide_inb(io_ports->lbah_addr); | 725 | tf->lbah = scc_ide_inb(io_ports->lbah_addr); |
724 | } | 726 | } |
725 | } | 727 | } |
726 | 728 | ||