Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f30cac6fbf30d92d517768fdbd616cd196b43d1d
Commit:     f30cac6fbf30d92d517768fdbd616cd196b43d1d
Parent:     78f0b62d4c15580369acf830f73a1f22570f201e
Author:     Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Fri May 11 11:21:47 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri May 11 17:53:41 2007 -0400

    sky2: only disable 88e8056 on some boards
    
    Use DMI to add a blacklist of broken boards (so far only one).
    Hopefully, the problems will be solved later, and the the whole
    blacklist can disappear.
    
    Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/sky2.c |   41 ++++++++++++++++++++++++++++++-----------
 1 files changed, 30 insertions(+), 11 deletions(-)

diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 2971eab..104e204 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -40,6 +40,7 @@
 #include <linux/if_vlan.h>
 #include <linux/prefetch.h>
 #include <linux/mii.h>
+#include <linux/dmi.h>
 
 #include <asm/irq.h>
 
@@ -150,6 +151,8 @@ static const char *yukon2_name[] = {
        "FE",           /* 0xb7 */
 };
 
+static int dmi_blacklisted;
+
 /* Access to external PHY */
 static int gm_phy_write(struct sky2_hw *hw, unsigned port, u16 reg, u16 val)
 {
@@ -2531,6 +2534,17 @@ static int __devinit sky2_init(struct sky2_hw *hw)
                return -EOPNOTSUPP;
        }
 
+
+       /* Some Gigabyte motherboards have 88e8056 but cause problems
+        * There is some unresolved hardware related problem that causes
+        * descriptor errors and receive data corruption.
+        */
+       if (hw->chip_id == CHIP_ID_YUKON_EC_U && dmi_blacklisted) {
+               dev_err(&hw->pdev->dev,
+                       "88E8056 on this motherboard not supported\n");
+               return -EOPNOTSUPP;
+       }
+
        hw->pmd_type = sky2_read8(hw, B2_PMD_TYP);
        hw->ports = 1;
        t8 = sky2_read8(hw, B2_Y2_HW_RES);
@@ -3578,17 +3592,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
                goto err_out;
        }
 
-       /* Some Gigabyte motherboards have 88e8056 but cause problems
-        * There is some unresolved hardware related problem that causes
-        * descriptor errors and receive data corruption.
-        */
-       if (pdev->vendor == PCI_VENDOR_ID_MARVELL &&
-           pdev->device == 0x4364 && pdev->subsystem_vendor == 0x1458) {
-               dev_err(&pdev->dev,
-                       "88E8056 on Gigabyte motherboards not supported\n");
-               goto err_out_disable;
-       }
-
        err = pci_request_regions(pdev, DRV_NAME);
        if (err) {
                dev_err(&pdev->dev, "cannot obtain PCI resources\n");
@@ -3907,8 +3910,24 @@ static struct pci_driver sky2_driver = {
        .shutdown = sky2_shutdown,
 };
 
+static struct dmi_system_id __initdata broken_dmi_table[] = {
+       {
+               .ident = "Gigabyte 965P-S3",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Gigabyte Technology Co., 
Ltd."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "965P-S3"),
+
+               },
+       },
+       { }
+};
+
 static int __init sky2_init_module(void)
 {
+       /* Look for sick motherboards */
+       if (dmi_check_system(broken_dmi_table))
+               dmi_blacklisted = 1;
+
        return pci_register_driver(&sky2_driver);
 }
 
-
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