Commit:     2f5c33b3180169f3eafb698b66686962d637fb0e
Parent:     efa06708fe77190f31bed5c3cb5da49e211240f5
Author:     Mark M. Hoffman <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 8 22:11:29 2007 -0500
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jan 9 09:07:52 2007 -0800

    [PATCH] i2c/pci: fix sis96x smbus quirk once and for all
    The sis96x SMBus PCI device depends on two different quirks to run
    in a specific order.  Apart from being fragile, this was found to
    actually break on (at least) recent FC4, FC5, and FC6 kernels.  This
    patch fixes the quirks so that they work without relying on the
    compiler and/or linker to put them in any specific order.
    I tested this patch.
    Signed-off-by: Mark M. Hoffman <[EMAIL PROTECTED]>
    Cc: Andrew Morton <[EMAIL PROTECTED]>
    Cc: Adrian Bunk <[EMAIL PROTECTED]>
    Cc: Greg K-H <[EMAIL PROTECTED]>
    Cc: Jean Delvare <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/pci/quirks.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 8f0322d..0535efc 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
PCI_DEVICE_ID_INTEL_ICH6_1,     asus_h
 static void quirk_sis_96x_smbus(struct pci_dev *dev)
        u8 val = 0;
-       printk(KERN_INFO "Enabling SiS 96x SMBus.\n");
-       pci_read_config_byte(dev, 0x77, &val);
-       pci_write_config_byte(dev, 0x77, val & ~0x10);
        pci_read_config_byte(dev, 0x77, &val);
+       if (val & 0x10) {
+               printk(KERN_INFO "Enabling SiS 96x SMBus.\n");
+               pci_write_config_byte(dev, 0x77, val & ~0x10);
+       }
@@ -1152,11 +1153,12 @@ static void quirk_sis_503(struct pci_dev *dev)
        printk(KERN_WARNING "Uncovering SIS%x that hid as a SIS503 
(compatible=%d)\n", devid, sis_96x_compatible);
-        * Ok, it now shows up as a 96x.. The 96x quirks are after
-        * the 503 quirk in the quirk table, so they'll automatically
-        * run and enable things like the SMBus device
+        * Ok, it now shows up as a 96x.. run the 96x quirk by
+        * hand in case it has already been processed.
+        * (depends on link order, which is apparently not guaranteed)
        dev->device = devid;
+       quirk_sis_96x_smbus(dev);
 static void __init quirk_sis_96x_compatible(struct pci_dev *dev)
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

Reply via email to