aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_sis.c
diff options
context:
space:
mode:
authorUwe Koziolek <uwe.koziolek@gmx.net>2007-06-14 17:40:43 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-02 10:17:42 -0400
commita3cabb271ea66739704497102536fb01bb72fe37 (patch)
tree0a6dc5d93bfe11c98f86f2fe516d385830937f92 /drivers/ata/pata_sis.c
parente14cbfa630cd3ab2631ee21b718b290928f47868 (diff)
libata: PATA-mode fixes for sis_sata
Changed PATA handler for PATA-ports used by sata_sis. This patch was originally submitted by Jeff Garzik. Added PCI-ID 1180 for SiS966 Controller in pata_sis. The 1180 mode is fully compatible to other SiS PATA-controller. The PCI-ID 1183 is SATA in PATA-emulation, but not fully compatible to SiS5513/5518. sata_sis.c is forwarding this ID to pata_sis. 1183 is not working if simply added to pata_sis. This handling fixes issues with SiS968. Signed-off-by: Uwe Koziolek <uwe.koziolek@gmx.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_sis.c')
-rw-r--r--drivers/ata/pata_sis.c46
1 files changed, 44 insertions, 2 deletions
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index ec3ae9375015..cfe4ec6eb3d5 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -560,6 +560,40 @@ static const struct ata_port_operations sis_133_ops = {
560 .port_start = ata_port_start, 560 .port_start = ata_port_start,
561}; 561};
562 562
563static const struct ata_port_operations sis_133_for_sata_ops = {
564 .port_disable = ata_port_disable,
565 .set_piomode = sis_133_set_piomode,
566 .set_dmamode = sis_133_set_dmamode,
567 .mode_filter = ata_pci_default_filter,
568
569 .tf_load = ata_tf_load,
570 .tf_read = ata_tf_read,
571 .check_status = ata_check_status,
572 .exec_command = ata_exec_command,
573 .dev_select = ata_std_dev_select,
574
575 .freeze = ata_bmdma_freeze,
576 .thaw = ata_bmdma_thaw,
577 .error_handler = ata_bmdma_error_handler,
578 .post_internal_cmd = ata_bmdma_post_internal_cmd,
579 .cable_detect = sis_133_cable_detect,
580
581 .bmdma_setup = ata_bmdma_setup,
582 .bmdma_start = ata_bmdma_start,
583 .bmdma_stop = ata_bmdma_stop,
584 .bmdma_status = ata_bmdma_status,
585 .qc_prep = ata_qc_prep,
586 .qc_issue = ata_qc_issue_prot,
587 .data_xfer = ata_data_xfer,
588
589 .irq_handler = ata_interrupt,
590 .irq_clear = ata_bmdma_irq_clear,
591 .irq_on = ata_irq_on,
592 .irq_ack = ata_irq_ack,
593
594 .port_start = ata_port_start,
595};
596
563static const struct ata_port_operations sis_133_early_ops = { 597static const struct ata_port_operations sis_133_early_ops = {
564 .port_disable = ata_port_disable, 598 .port_disable = ata_port_disable,
565 .set_piomode = sis_100_set_piomode, 599 .set_piomode = sis_100_set_piomode,
@@ -733,13 +767,20 @@ static const struct ata_port_info sis_info100_early = {
733 .pio_mask = 0x1f, /* pio0-4 */ 767 .pio_mask = 0x1f, /* pio0-4 */
734 .port_ops = &sis_66_ops, 768 .port_ops = &sis_66_ops,
735}; 769};
736const struct ata_port_info sis_info133 = { 770static const struct ata_port_info sis_info133 = {
737 .sht = &sis_sht, 771 .sht = &sis_sht,
738 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, 772 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
739 .pio_mask = 0x1f, /* pio0-4 */ 773 .pio_mask = 0x1f, /* pio0-4 */
740 .udma_mask = ATA_UDMA6, 774 .udma_mask = ATA_UDMA6,
741 .port_ops = &sis_133_ops, 775 .port_ops = &sis_133_ops,
742}; 776};
777const struct ata_port_info sis_info133_for_sata = {
778 .sht = &sis_sht,
779 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
780 .pio_mask = 0x1f, /* pio0-4 */
781 .udma_mask = ATA_UDMA6,
782 .port_ops = &sis_133_for_sata_ops,
783};
743static const struct ata_port_info sis_info133_early = { 784static const struct ata_port_info sis_info133_early = {
744 .sht = &sis_sht, 785 .sht = &sis_sht,
745 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, 786 .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
@@ -749,7 +790,7 @@ static const struct ata_port_info sis_info133_early = {
749}; 790};
750 791
751/* Privately shared with the SiS180 SATA driver, not for use elsewhere */ 792/* Privately shared with the SiS180 SATA driver, not for use elsewhere */
752EXPORT_SYMBOL_GPL(sis_info133); 793EXPORT_SYMBOL_GPL(sis_info133_for_sata);
753 794
754static void sis_fixup(struct pci_dev *pdev, struct sis_chipset *sis) 795static void sis_fixup(struct pci_dev *pdev, struct sis_chipset *sis)
755{ 796{
@@ -975,6 +1016,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
975static const struct pci_device_id sis_pci_tbl[] = { 1016static const struct pci_device_id sis_pci_tbl[] = {
976 { PCI_VDEVICE(SI, 0x5513), }, /* SiS 5513 */ 1017 { PCI_VDEVICE(SI, 0x5513), }, /* SiS 5513 */
977 { PCI_VDEVICE(SI, 0x5518), }, /* SiS 5518 */ 1018 { PCI_VDEVICE(SI, 0x5518), }, /* SiS 5518 */
1019 { PCI_VDEVICE(SI, 0x1180), }, /* SiS 1180 */
978 1020
979 { } 1021 { }
980}; 1022};