Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cf5792d20cdc9a88abf9984a2224f57de1952926
Commit:     cf5792d20cdc9a88abf9984a2224f57de1952926
Parent:     6dffaf61e22d21e539ae7e30c2e33e41230c3d52
Author:     Alan Cox <[EMAIL PROTECTED]>
AuthorDate: Wed May 23 22:39:01 2007 +0100
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Thu May 24 20:34:48 2007 -0400

    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 <[EMAIL PROTECTED]>
    Tested-by: Francis Russell <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 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 e4c71f7..708dfc0 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -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"
@@ -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
@@ -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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to