diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2007-05-23 17:39:01 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-05-24 20:34:48 -0400 |
commit | cf5792d20cdc9a88abf9984a2224f57de1952926 (patch) | |
tree | c887e7b38d139f08c3d4204945dceda1afa9a651 /drivers/ata/pata_via.c | |
parent | 6dffaf61e22d21e539ae7e30c2e33e41230c3d52 (diff) |
pata_via: Handle laptops via DMI
Oh the joy of saving a fraction of a cent using short 40 wire cables and
not faking 80wire
Teach the VIA driver that there are some systems we need to know are
magically wired for high speeds.
Signed-off-by: Alan Cox <alan@redhat.com>
Tested-by: Francis Russell <FrancisRussell@btinternet.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_via.c')
-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; |