Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344410
b: refs/heads/master
c: abf8f2b
h: refs/heads/master
v: v3
  • Loading branch information
Christian Gmeiner authored and Jeff Garzik committed Nov 28, 2012
1 parent 7b66294 commit c1a8960
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d9904344fc4052fbe7e4dc137eba0dcdadf326bd
refs/heads/master: abf8f2b877846573f0e6498883fe43f08be5696d
32 changes: 31 additions & 1 deletion trunk/drivers/ata/pata_cs5536.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <linux/delay.h>
#include <linux/libata.h>
#include <scsi/scsi_host.h>
#include <linux/dmi.h>

#ifdef CONFIG_X86_32
#include <asm/msr.h>
Expand Down Expand Up @@ -80,6 +81,21 @@ enum {
IDE_ETC_UDMA_MASK = 0xc0,
};

/* Some Bachmann OT200 devices have a non working UDMA support due a
* missing resistor.
*/
static const struct dmi_system_id udma_quirk_dmi_table[] = {
{
.ident = "Bachmann electronic OT200",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Bachmann electronic"),
DMI_MATCH(DMI_PRODUCT_NAME, "OT200"),
DMI_MATCH(DMI_PRODUCT_VERSION, "1")
},
},
{ }
};

static int cs5536_read(struct pci_dev *pdev, int reg, u32 *val)
{
if (unlikely(use_msr)) {
Expand Down Expand Up @@ -242,9 +258,23 @@ static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id)
.port_ops = &cs5536_port_ops,
};

const struct ata_port_info *ppi[] = { &info, &ata_dummy_port_info };
static const struct ata_port_info no_udma_info = {
.flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = ATA_PIO4,
.port_ops = &cs5536_port_ops,
};


const struct ata_port_info *ppi[2];
u32 cfg;

if (dmi_check_system(udma_quirk_dmi_table))
ppi[0] = &no_udma_info;
else
ppi[0] = &info;

ppi[1] = &ata_dummy_port_info;

if (use_msr)
printk(KERN_ERR DRV_NAME ": Using MSR regs instead of PCI\n");

Expand Down

0 comments on commit c1a8960

Please sign in to comment.