Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
[powerpc.git] / drivers / pci / quirks.c
index 7f94fc0..147d86f 100644 (file)
@@ -963,6 +963,13 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, k8t_sound_ho
  * bridge. Unfortunately, this device has no subvendor/subdevice ID. So it 
  * becomes necessary to do this tweak in two steps -- I've chosen the Host
  * bridge as trigger.
+ *
+ * Note that we used to unhide the SMBus that way on Toshiba laptops
+ * (Satellite A40 and Tecra M2) but then found that the thermal management
+ * was done by SMM code, which could cause unsynchronized concurrent
+ * accesses to the SMBus registers, with potentially bad effects. Thus you
+ * should be very careful when adding new entries: if SMM is accessing the
+ * Intel SMBus, this is a very good reason to leave it hidden.
  */
 static int asus_hides_smbus;
 
@@ -1040,17 +1047,6 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
                        case 0x099c: /* HP Compaq nx6110 */
                                asus_hides_smbus = 1;
                        }
-       } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_TOSHIBA)) {
-               if (dev->device == PCI_DEVICE_ID_INTEL_82855GM_HB)
-                       switch(dev->subsystem_device) {
-                       case 0x0001: /* Toshiba Satellite A40 */
-                               asus_hides_smbus = 1;
-                       }
-               else if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB)
-                       switch(dev->subsystem_device) {
-                       case 0x0001: /* Toshiba Tecra M2 */
-                               asus_hides_smbus = 1;
-                       }
        } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG)) {
                if (dev->device ==  PCI_DEVICE_ID_INTEL_82855PM_HB)
                        switch(dev->subsystem_device) {
@@ -1307,119 +1303,6 @@ static void __init quirk_alder_ioapic(struct pci_dev *pdev)
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_EESSC,      quirk_alder_ioapic );
 #endif
 
-enum ide_combined_type { COMBINED = 0, IDE = 1, LIBATA = 2 };
-/* Defaults to combined */
-static enum ide_combined_type combined_mode;
-
-static int __init combined_setup(char *str)
-{
-       if (!strncmp(str, "ide", 3))
-               combined_mode = IDE;
-       else if (!strncmp(str, "libata", 6))
-               combined_mode = LIBATA;
-       else /* "combined" or anything else defaults to old behavior */
-               combined_mode = COMBINED;
-
-       return 1;
-}
-__setup("combined_mode=", combined_setup);
-
-#ifdef CONFIG_SATA_INTEL_COMBINED
-static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev)
-{
-       u8 prog, comb, tmp;
-       int ich = 0;
-
-       /*
-        * Narrow down to Intel SATA PCI devices.
-        */
-       switch (pdev->device) {
-       /* PCI ids taken from drivers/scsi/ata_piix.c */
-       case 0x24d1:
-       case 0x24df:
-       case 0x25a3:
-       case 0x25b0:
-               ich = 5;
-               break;
-       case 0x2651:
-       case 0x2652:
-       case 0x2653:
-       case 0x2680:    /* ESB2 */
-               ich = 6;
-               break;
-       case 0x27c0:
-       case 0x27c4:
-               ich = 7;
-               break;
-       case 0x2828:    /* ICH8M */
-               ich = 8;
-               break;
-       default:
-               /* we do not handle this PCI device */
-               return;
-       }
-
-       /*
-        * Read combined mode register.
-        */
-       pci_read_config_byte(pdev, 0x90, &tmp); /* combined mode reg */
-
-       if (ich == 5) {
-               tmp &= 0x6;  /* interesting bits 2:1, PATA primary/secondary */
-               if (tmp == 0x4)         /* bits 10x */
-                       comb = (1 << 0);        /* SATA port 0, PATA port 1 */
-               else if (tmp == 0x6)    /* bits 11x */
-                       comb = (1 << 2);        /* PATA port 0, SATA port 1 */
-               else
-                       return;                 /* not in combined mode */
-       } else {
-               WARN_ON((ich != 6) && (ich != 7) && (ich != 8));
-               tmp &= 0x3;  /* interesting bits 1:0 */
-               if (tmp & (1 << 0))
-                       comb = (1 << 2);        /* PATA port 0, SATA port 1 */
-               else if (tmp & (1 << 1))
-                       comb = (1 << 0);        /* SATA port 0, PATA port 1 */
-               else
-                       return;                 /* not in combined mode */
-       }
-
-       /*
-        * Read programming interface register.
-        * (Tells us if it's legacy or native mode)
-        */
-       pci_read_config_byte(pdev, PCI_CLASS_PROG, &prog);
-
-       /* if SATA port is in native mode, we're ok. */
-       if (prog & comb)
-               return;
-
-       /* Don't reserve any so the IDE driver can get them (but only if
-        * combined_mode=ide).
-        */
-       if (combined_mode == IDE)
-               return;
-
-       /* Grab them both for libata if combined_mode=libata. */
-       if (combined_mode == LIBATA) {
-               request_region(0x1f0, 8, "libata");     /* port 0 */
-               request_region(0x170, 8, "libata");     /* port 1 */
-               return;
-       }
-
-       /* SATA port is in legacy mode.  Reserve port so that
-        * IDE driver does not attempt to use it.  If request_region
-        * fails, it will be obvious at boot time, so we don't bother
-        * checking return values.
-        */
-       if (comb == (1 << 0))
-               request_region(0x1f0, 8, "libata");     /* port 0 */
-       else
-               request_region(0x170, 8, "libata");     /* port 1 */
-}
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,    PCI_ANY_ID,      quirk_intel_ide_combined );
-#endif /* CONFIG_SATA_INTEL_COMBINED */
-
-
 int pcie_mch_quirk;
 EXPORT_SYMBOL(pcie_mch_quirk);
 
@@ -1765,6 +1648,8 @@ static void __devinit quirk_disable_msi(struct pci_dev *dev)
        }
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_disable_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_msi);
 
 /* Go through the list of Hypertransport capabilities and
  * return 1 if a HT MSI capability is found and enabled */