aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/scc_pata.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/scc_pata.c')
-rw-r--r--drivers/ide/scc_pata.c62
1 files changed, 31 insertions, 31 deletions
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
669static void scc_tf_load(ide_drive_t *drive, ide_task_t *task) 669static 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
709static void scc_tf_read(ide_drive_t *drive, ide_task_t *task) 709static 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}