Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56967
b: refs/heads/master
c: cf5792d
h: refs/heads/master
i:
  56965: 267a3fb
  56963: e0a7dfc
  56959: 50ef9f1
v: v3
  • Loading branch information
Alan Cox authored and Jeff Garzik committed May 25, 2007
1 parent 1366420 commit c16d6d3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6dffaf61e22d21e539ae7e30c2e33e41230c3d52
refs/heads/master: cf5792d20cdc9a88abf9984a2224f57de1952926
29 changes: 29 additions & 0 deletions trunk/drivers/ata/pata_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#include <linux/delay.h>
#include <scsi/scsi_host.h>
#include <linux/libata.h>
#include <linux/dmi.h>

#define DRV_NAME "pata_via"
#define DRV_VERSION "0.3.1"
Expand Down Expand Up @@ -122,6 +123,31 @@ static const struct via_isa_bridge {
{ NULL }
};


/*
* Cable special cases
*/

static struct dmi_system_id cable_dmi_table[] = {
{
.ident = "Acer Ferrari 3400",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Acer,Inc."),
DMI_MATCH(DMI_BOARD_NAME, "Ferrari 3400"),
},
},
{ }
};

static int via_cable_override(struct pci_dev *pdev)
{
/* Systems by DMI */
if (dmi_check_system(cable_dmi_table))
return 1;
return 0;
}


/**
* via_cable_detect - cable detection
* @ap: ATA port
Expand All @@ -139,6 +165,9 @@ static int via_cable_detect(struct ata_port *ap) {
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
u32 ata66;

if (via_cable_override(pdev))
return ATA_CBL_PATA40_SHORT;

/* Early chips are 40 wire */
if ((config->flags & VIA_UDMA) < VIA_UDMA_66)
return ATA_CBL_PATA40;
Expand Down

0 comments on commit c16d6d3

Please sign in to comment.