aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_cs5536.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_cs5536.c')
-rw-r--r--drivers/ata/pata_cs5536.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
index dec1b6c4b351..0448860a2077 100644
--- a/drivers/ata/pata_cs5536.c
+++ b/drivers/ata/pata_cs5536.c
@@ -38,6 +38,7 @@
38#include <linux/delay.h> 38#include <linux/delay.h>
39#include <linux/libata.h> 39#include <linux/libata.h>
40#include <scsi/scsi_host.h> 40#include <scsi/scsi_host.h>
41#include <linux/dmi.h>
41 42
42#ifdef CONFIG_X86_32 43#ifdef CONFIG_X86_32
43#include <asm/msr.h> 44#include <asm/msr.h>
@@ -80,6 +81,21 @@ enum {
80 IDE_ETC_UDMA_MASK = 0xc0, 81 IDE_ETC_UDMA_MASK = 0xc0,
81}; 82};
82 83
84/* Some Bachmann OT200 devices have a non working UDMA support due a
85 * missing resistor.
86 */
87static const struct dmi_system_id udma_quirk_dmi_table[] = {
88 {
89 .ident = "Bachmann electronic OT200",
90 .matches = {
91 DMI_MATCH(DMI_SYS_VENDOR, "Bachmann electronic"),
92 DMI_MATCH(DMI_PRODUCT_NAME, "OT200"),
93 DMI_MATCH(DMI_PRODUCT_VERSION, "1")
94 },
95 },
96 { }
97};
98
83static int cs5536_read(struct pci_dev *pdev, int reg, u32 *val) 99static int cs5536_read(struct pci_dev *pdev, int reg, u32 *val)
84{ 100{
85 if (unlikely(use_msr)) { 101 if (unlikely(use_msr)) {
@@ -242,9 +258,23 @@ static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id)
242 .port_ops = &cs5536_port_ops, 258 .port_ops = &cs5536_port_ops,
243 }; 259 };
244 260
245 const struct ata_port_info *ppi[] = { &info, &ata_dummy_port_info }; 261 static const struct ata_port_info no_udma_info = {
262 .flags = ATA_FLAG_SLAVE_POSS,
263 .pio_mask = ATA_PIO4,
264 .port_ops = &cs5536_port_ops,
265 };
266
267
268 const struct ata_port_info *ppi[2];
246 u32 cfg; 269 u32 cfg;
247 270
271 if (dmi_check_system(udma_quirk_dmi_table))
272 ppi[0] = &no_udma_info;
273 else
274 ppi[0] = &info;
275
276 ppi[1] = &ata_dummy_port_info;
277
248 if (use_msr) 278 if (use_msr)
249 printk(KERN_ERR DRV_NAME ": Using MSR regs instead of PCI\n"); 279 printk(KERN_ERR DRV_NAME ": Using MSR regs instead of PCI\n");
250 280