diff options
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_via.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index e4c71f76bd55..708dfc0c716b 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; |