diff options
Diffstat (limited to 'drivers/ata/pata_sis.c')
-rw-r--r-- | drivers/ata/pata_sis.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index cce2834b2b60..3b5be77e861c 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c | |||
@@ -84,7 +84,7 @@ static int sis_short_ata40(struct pci_dev *dev) | |||
84 | 84 | ||
85 | static int sis_old_port_base(struct ata_device *adev) | 85 | static int sis_old_port_base(struct ata_device *adev) |
86 | { | 86 | { |
87 | return 0x40 + (4 * adev->ap->port_no) + (2 * adev->devno); | 87 | return 0x40 + (4 * adev->link->ap->port_no) + (2 * adev->devno); |
88 | } | 88 | } |
89 | 89 | ||
90 | /** | 90 | /** |
@@ -133,19 +133,20 @@ static int sis_66_cable_detect(struct ata_port *ap) | |||
133 | 133 | ||
134 | /** | 134 | /** |
135 | * sis_pre_reset - probe begin | 135 | * sis_pre_reset - probe begin |
136 | * @ap: ATA port | 136 | * @link: ATA link |
137 | * @deadline: deadline jiffies for the operation | 137 | * @deadline: deadline jiffies for the operation |
138 | * | 138 | * |
139 | * Set up cable type and use generic probe init | 139 | * Set up cable type and use generic probe init |
140 | */ | 140 | */ |
141 | 141 | ||
142 | static int sis_pre_reset(struct ata_port *ap, unsigned long deadline) | 142 | static int sis_pre_reset(struct ata_link *link, unsigned long deadline) |
143 | { | 143 | { |
144 | static const struct pci_bits sis_enable_bits[] = { | 144 | static const struct pci_bits sis_enable_bits[] = { |
145 | { 0x4aU, 1U, 0x02UL, 0x02UL }, /* port 0 */ | 145 | { 0x4aU, 1U, 0x02UL, 0x02UL }, /* port 0 */ |
146 | { 0x4aU, 1U, 0x04UL, 0x04UL }, /* port 1 */ | 146 | { 0x4aU, 1U, 0x04UL, 0x04UL }, /* port 1 */ |
147 | }; | 147 | }; |
148 | 148 | ||
149 | struct ata_port *ap = link->ap; | ||
149 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 150 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
150 | 151 | ||
151 | if (!pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no])) | 152 | if (!pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no])) |
@@ -154,7 +155,7 @@ static int sis_pre_reset(struct ata_port *ap, unsigned long deadline) | |||
154 | /* Clear the FIFO settings. We can't enable the FIFO until | 155 | /* Clear the FIFO settings. We can't enable the FIFO until |
155 | we know we are poking at a disk */ | 156 | we know we are poking at a disk */ |
156 | pci_write_config_byte(pdev, 0x4B, 0); | 157 | pci_write_config_byte(pdev, 0x4B, 0); |
157 | return ata_std_prereset(ap, deadline); | 158 | return ata_std_prereset(link, deadline); |
158 | } | 159 | } |
159 | 160 | ||
160 | 161 | ||
@@ -530,7 +531,6 @@ static struct scsi_host_template sis_sht = { | |||
530 | }; | 531 | }; |
531 | 532 | ||
532 | static const struct ata_port_operations sis_133_ops = { | 533 | static const struct ata_port_operations sis_133_ops = { |
533 | .port_disable = ata_port_disable, | ||
534 | .set_piomode = sis_133_set_piomode, | 534 | .set_piomode = sis_133_set_piomode, |
535 | .set_dmamode = sis_133_set_dmamode, | 535 | .set_dmamode = sis_133_set_dmamode, |
536 | .mode_filter = ata_pci_default_filter, | 536 | .mode_filter = ata_pci_default_filter, |
@@ -558,13 +558,11 @@ static const struct ata_port_operations sis_133_ops = { | |||
558 | .irq_handler = ata_interrupt, | 558 | .irq_handler = ata_interrupt, |
559 | .irq_clear = ata_bmdma_irq_clear, | 559 | .irq_clear = ata_bmdma_irq_clear, |
560 | .irq_on = ata_irq_on, | 560 | .irq_on = ata_irq_on, |
561 | .irq_ack = ata_irq_ack, | ||
562 | 561 | ||
563 | .port_start = ata_port_start, | 562 | .port_start = ata_sff_port_start, |
564 | }; | 563 | }; |
565 | 564 | ||
566 | static const struct ata_port_operations sis_133_for_sata_ops = { | 565 | static const struct ata_port_operations sis_133_for_sata_ops = { |
567 | .port_disable = ata_port_disable, | ||
568 | .set_piomode = sis_133_set_piomode, | 566 | .set_piomode = sis_133_set_piomode, |
569 | .set_dmamode = sis_133_set_dmamode, | 567 | .set_dmamode = sis_133_set_dmamode, |
570 | .mode_filter = ata_pci_default_filter, | 568 | .mode_filter = ata_pci_default_filter, |
@@ -592,13 +590,11 @@ static const struct ata_port_operations sis_133_for_sata_ops = { | |||
592 | .irq_handler = ata_interrupt, | 590 | .irq_handler = ata_interrupt, |
593 | .irq_clear = ata_bmdma_irq_clear, | 591 | .irq_clear = ata_bmdma_irq_clear, |
594 | .irq_on = ata_irq_on, | 592 | .irq_on = ata_irq_on, |
595 | .irq_ack = ata_irq_ack, | ||
596 | 593 | ||
597 | .port_start = ata_port_start, | 594 | .port_start = ata_sff_port_start, |
598 | }; | 595 | }; |
599 | 596 | ||
600 | static const struct ata_port_operations sis_133_early_ops = { | 597 | static const struct ata_port_operations sis_133_early_ops = { |
601 | .port_disable = ata_port_disable, | ||
602 | .set_piomode = sis_100_set_piomode, | 598 | .set_piomode = sis_100_set_piomode, |
603 | .set_dmamode = sis_133_early_set_dmamode, | 599 | .set_dmamode = sis_133_early_set_dmamode, |
604 | .mode_filter = ata_pci_default_filter, | 600 | .mode_filter = ata_pci_default_filter, |
@@ -626,13 +622,11 @@ static const struct ata_port_operations sis_133_early_ops = { | |||
626 | .irq_handler = ata_interrupt, | 622 | .irq_handler = ata_interrupt, |
627 | .irq_clear = ata_bmdma_irq_clear, | 623 | .irq_clear = ata_bmdma_irq_clear, |
628 | .irq_on = ata_irq_on, | 624 | .irq_on = ata_irq_on, |
629 | .irq_ack = ata_irq_ack, | ||
630 | 625 | ||
631 | .port_start = ata_port_start, | 626 | .port_start = ata_sff_port_start, |
632 | }; | 627 | }; |
633 | 628 | ||
634 | static const struct ata_port_operations sis_100_ops = { | 629 | static const struct ata_port_operations sis_100_ops = { |
635 | .port_disable = ata_port_disable, | ||
636 | .set_piomode = sis_100_set_piomode, | 630 | .set_piomode = sis_100_set_piomode, |
637 | .set_dmamode = sis_100_set_dmamode, | 631 | .set_dmamode = sis_100_set_dmamode, |
638 | .mode_filter = ata_pci_default_filter, | 632 | .mode_filter = ata_pci_default_filter, |
@@ -660,13 +654,11 @@ static const struct ata_port_operations sis_100_ops = { | |||
660 | .irq_handler = ata_interrupt, | 654 | .irq_handler = ata_interrupt, |
661 | .irq_clear = ata_bmdma_irq_clear, | 655 | .irq_clear = ata_bmdma_irq_clear, |
662 | .irq_on = ata_irq_on, | 656 | .irq_on = ata_irq_on, |
663 | .irq_ack = ata_irq_ack, | ||
664 | 657 | ||
665 | .port_start = ata_port_start, | 658 | .port_start = ata_sff_port_start, |
666 | }; | 659 | }; |
667 | 660 | ||
668 | static const struct ata_port_operations sis_66_ops = { | 661 | static const struct ata_port_operations sis_66_ops = { |
669 | .port_disable = ata_port_disable, | ||
670 | .set_piomode = sis_old_set_piomode, | 662 | .set_piomode = sis_old_set_piomode, |
671 | .set_dmamode = sis_66_set_dmamode, | 663 | .set_dmamode = sis_66_set_dmamode, |
672 | .mode_filter = ata_pci_default_filter, | 664 | .mode_filter = ata_pci_default_filter, |
@@ -694,13 +686,11 @@ static const struct ata_port_operations sis_66_ops = { | |||
694 | .irq_handler = ata_interrupt, | 686 | .irq_handler = ata_interrupt, |
695 | .irq_clear = ata_bmdma_irq_clear, | 687 | .irq_clear = ata_bmdma_irq_clear, |
696 | .irq_on = ata_irq_on, | 688 | .irq_on = ata_irq_on, |
697 | .irq_ack = ata_irq_ack, | ||
698 | 689 | ||
699 | .port_start = ata_port_start, | 690 | .port_start = ata_sff_port_start, |
700 | }; | 691 | }; |
701 | 692 | ||
702 | static const struct ata_port_operations sis_old_ops = { | 693 | static const struct ata_port_operations sis_old_ops = { |
703 | .port_disable = ata_port_disable, | ||
704 | .set_piomode = sis_old_set_piomode, | 694 | .set_piomode = sis_old_set_piomode, |
705 | .set_dmamode = sis_old_set_dmamode, | 695 | .set_dmamode = sis_old_set_dmamode, |
706 | .mode_filter = ata_pci_default_filter, | 696 | .mode_filter = ata_pci_default_filter, |
@@ -728,9 +718,8 @@ static const struct ata_port_operations sis_old_ops = { | |||
728 | .irq_handler = ata_interrupt, | 718 | .irq_handler = ata_interrupt, |
729 | .irq_clear = ata_bmdma_irq_clear, | 719 | .irq_clear = ata_bmdma_irq_clear, |
730 | .irq_on = ata_irq_on, | 720 | .irq_on = ata_irq_on, |
731 | .irq_ack = ata_irq_ack, | ||
732 | 721 | ||
733 | .port_start = ata_port_start, | 722 | .port_start = ata_sff_port_start, |
734 | }; | 723 | }; |
735 | 724 | ||
736 | static const struct ata_port_info sis_info = { | 725 | static const struct ata_port_info sis_info = { |