aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci.h2
-rw-r--r--drivers/pci/quirks.c45
2 files changed, 31 insertions, 16 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 08d58fc78ee1..6bf327db5c5e 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -42,7 +42,7 @@ extern void pci_remove_legacy_files(struct pci_bus *bus);
42/* Lock for read/write access to pci device and bus lists */ 42/* Lock for read/write access to pci device and bus lists */
43extern struct rw_semaphore pci_bus_sem; 43extern struct rw_semaphore pci_bus_sem;
44 44
45#ifdef CONFIG_X86_IO_APIC 45#ifdef CONFIG_PCI_MSI
46extern int pci_msi_quirk; 46extern int pci_msi_quirk;
47#else 47#else
48#define pci_msi_quirk 0 48#define pci_msi_quirk 0
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index def78a2a7c15..8385b815ecb1 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -577,8 +577,6 @@ static void __init quirk_ioapic_rmw(struct pci_dev *dev)
577} 577}
578DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_ANY_ID, quirk_ioapic_rmw ); 578DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_ANY_ID, quirk_ioapic_rmw );
579 579
580int pci_msi_quirk;
581
582#define AMD8131_revA0 0x01 580#define AMD8131_revA0 0x01
583#define AMD8131_revB0 0x11 581#define AMD8131_revB0 0x11
584#define AMD8131_MISC 0x40 582#define AMD8131_MISC 0x40
@@ -587,12 +585,6 @@ static void __init quirk_amd_8131_ioapic(struct pci_dev *dev)
587{ 585{
588 unsigned char revid, tmp; 586 unsigned char revid, tmp;
589 587
590 if (dev->subordinate) {
591 printk(KERN_WARNING "PCI: MSI quirk detected. "
592 "PCI_BUS_FLAGS_NO_MSI set for subordinate bus.\n");
593 dev->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
594 }
595
596 if (nr_ioapics == 0) 588 if (nr_ioapics == 0)
597 return; 589 return;
598 590
@@ -605,13 +597,6 @@ static void __init quirk_amd_8131_ioapic(struct pci_dev *dev)
605 } 597 }
606} 598}
607DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_amd_8131_ioapic); 599DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_amd_8131_ioapic);
608
609static void __init quirk_svw_msi(struct pci_dev *dev)
610{
611 pci_msi_quirk = 1;
612 printk(KERN_WARNING "PCI: MSI quirk detected. pci_msi_quirk set.\n");
613}
614DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_svw_msi );
615#endif /* CONFIG_X86_IO_APIC */ 600#endif /* CONFIG_X86_IO_APIC */
616 601
617 602
@@ -1690,6 +1675,36 @@ static void __devinit quirk_nvidia_ck804_pcie_aer_ext_cap(struct pci_dev *dev)
1690DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, 1675DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
1691 quirk_nvidia_ck804_pcie_aer_ext_cap); 1676 quirk_nvidia_ck804_pcie_aer_ext_cap);
1692 1677
1678#ifdef CONFIG_PCI_MSI
1679/* To disable MSI globally */
1680int pci_msi_quirk;
1681
1682/* The Serverworks PCI-X chipset does not support MSI. We cannot easily rely
1683 * on setting PCI_BUS_FLAGS_NO_MSI in its bus flags because there are actually
1684 * some other busses controlled by the chipset even if Linux is not aware of it.
1685 * Instead of setting the flag on all busses in the machine, simply disable MSI
1686 * globally.
1687 */
1688static void __init quirk_svw_msi(struct pci_dev *dev)
1689{
1690 pci_msi_quirk = 1;
1691 printk(KERN_WARNING "PCI: MSI quirk detected. pci_msi_quirk set.\n");
1692}
1693DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_svw_msi);
1694
1695/* Disable MSI on chipsets that are known to not support it */
1696static void __devinit quirk_disable_msi(struct pci_dev *dev)
1697{
1698 if (dev->subordinate) {
1699 printk(KERN_WARNING "PCI: MSI quirk detected. "
1700 "PCI_BUS_FLAGS_NO_MSI set for %s subordinate bus.\n",
1701 pci_name(dev));
1702 dev->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
1703 }
1704}
1705DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_disable_msi);
1706#endif /* CONFIG_PCI_MSI */
1707
1693EXPORT_SYMBOL(pcie_mch_quirk); 1708EXPORT_SYMBOL(pcie_mch_quirk);
1694#ifdef CONFIG_HOTPLUG 1709#ifdef CONFIG_HOTPLUG
1695EXPORT_SYMBOL(pci_fixup_device); 1710EXPORT_SYMBOL(pci_fixup_device);