diff options
Diffstat (limited to 'drivers/ata/pata_via.c')
-rw-r--r-- | drivers/ata/pata_via.c | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index e4c71f76bd55..a8462f1e890b 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -60,6 +60,7 @@ | |||
60 | #include <linux/delay.h> | 60 | #include <linux/delay.h> |
61 | #include <scsi/scsi_host.h> | 61 | #include <scsi/scsi_host.h> |
62 | #include <linux/libata.h> | 62 | #include <linux/libata.h> |
63 | #include <linux/dmi.h> | ||
63 | 64 | ||
64 | #define DRV_NAME "pata_via" | 65 | #define DRV_NAME "pata_via" |
65 | #define DRV_VERSION "0.3.1" | 66 | #define DRV_VERSION "0.3.1" |
@@ -122,6 +123,31 @@ static const struct via_isa_bridge { | |||
122 | { NULL } | 123 | { NULL } |
123 | }; | 124 | }; |
124 | 125 | ||
126 | |||
127 | /* | ||
128 | * Cable special cases | ||
129 | */ | ||
130 | |||
131 | static struct dmi_system_id cable_dmi_table[] = { | ||
132 | { | ||
133 | .ident = "Acer Ferrari 3400", | ||
134 | .matches = { | ||
135 | DMI_MATCH(DMI_BOARD_VENDOR, "Acer,Inc."), | ||
136 | DMI_MATCH(DMI_BOARD_NAME, "Ferrari 3400"), | ||
137 | }, | ||
138 | }, | ||
139 | { } | ||
140 | }; | ||
141 | |||
142 | static int via_cable_override(struct pci_dev *pdev) | ||
143 | { | ||
144 | /* Systems by DMI */ | ||
145 | if (dmi_check_system(cable_dmi_table)) | ||
146 | return 1; | ||
147 | return 0; | ||
148 | } | ||
149 | |||
150 | |||
125 | /** | 151 | /** |
126 | * via_cable_detect - cable detection | 152 | * via_cable_detect - cable detection |
127 | * @ap: ATA port | 153 | * @ap: ATA port |
@@ -139,6 +165,9 @@ static int via_cable_detect(struct ata_port *ap) { | |||
139 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 165 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
140 | u32 ata66; | 166 | u32 ata66; |
141 | 167 | ||
168 | if (via_cable_override(pdev)) | ||
169 | return ATA_CBL_PATA40_SHORT; | ||
170 | |||
142 | /* Early chips are 40 wire */ | 171 | /* Early chips are 40 wire */ |
143 | if ((config->flags & VIA_UDMA) < VIA_UDMA_66) | 172 | if ((config->flags & VIA_UDMA) < VIA_UDMA_66) |
144 | return ATA_CBL_PATA40; | 173 | return ATA_CBL_PATA40; |
@@ -592,10 +621,11 @@ static int via_reinit_one(struct pci_dev *pdev) | |||
592 | #endif | 621 | #endif |
593 | 622 | ||
594 | static const struct pci_device_id via[] = { | 623 | static const struct pci_device_id via[] = { |
595 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), }, | 624 | { PCI_VDEVICE(VIA, 0x0571), }, |
596 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C586_1), }, | 625 | { PCI_VDEVICE(VIA, 0x0581), }, |
597 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_6410), }, | 626 | { PCI_VDEVICE(VIA, 0x1571), }, |
598 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_SATA_EIDE), }, | 627 | { PCI_VDEVICE(VIA, 0x3164), }, |
628 | { PCI_VDEVICE(VIA, 0x5324), }, | ||
599 | 629 | ||
600 | { }, | 630 | { }, |
601 | }; | 631 | }; |