patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / arch / i386 / pci / fixup.c
index d436e00..a8b1954 100644 (file)
@@ -91,6 +91,15 @@ static void __devinit  pci_fixup_ide_trash(struct pci_dev *d)
 {
        int i;
 
+       /*
+        * Runs the fixup only for the first IDE controller
+        * (Shai Fultheim - shai@ftcon.com)
+        */
+       static int called = 0;
+       if (called)
+               return;
+       called = 1;
+
        /*
         * There exist PCI IDE controllers which have utter garbage
         * in first four base registers. Ignore that.
@@ -217,7 +226,12 @@ static void __init pci_fixup_nforce2(struct pci_dev *dev)
        fixed_val = rev < 0xC1 ? 0x1F01FF01 : 0x9F01FF01;
 
        pci_read_config_dword(dev, 0x6c, &val);
-       if (val != fixed_val) {
+
+       /*
+        * Apply fixup only if C1 Halt Disconnect is enabled
+        * (bit28) because it is not supported on some boards.
+        */
+       if ((val & (1 << 28)) && val != fixed_val) {
                printk(KERN_WARNING "PCI: nForce2 C1 Halt Disconnect fixup\n");
                pci_write_config_dword(dev, 0x6c, fixed_val);
        }