aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorKristen Accardi <kristen.c.accardi@intel.com>2005-08-16 18:15:58 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-17 00:06:24 -0400
commit4602b88d9743b5f20655de8078fb42e9fd25581f (patch)
tree46fa501c25d46ef0691ee6891d928bb8def2e25e /drivers/pci
parent208f3d6175cb17772c5af202fe12373f90894ff4 (diff)
[PATCH] PCI: 6700/6702PXH quirk
On the 6700/6702 PXH part, a MSI may get corrupted if an ACPI hotplug driver and SHPC driver in MSI mode are used together. This patch will prevent MSI from being enabled for the SHPC as part of an early pci quirk, as well as on any pci device which sets the no_msi bit. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/msi.c5
-rw-r--r--drivers/pci/pci.h2
-rw-r--r--drivers/pci/quirks.c21
3 files changed, 26 insertions, 2 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index b5ab9aa6ff7c..2b85aa39f954 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -453,7 +453,7 @@ static void enable_msi_mode(struct pci_dev *dev, int pos, int type)
453 } 453 }
454} 454}
455 455
456static void disable_msi_mode(struct pci_dev *dev, int pos, int type) 456void disable_msi_mode(struct pci_dev *dev, int pos, int type)
457{ 457{
458 u16 control; 458 u16 control;
459 459
@@ -699,6 +699,9 @@ int pci_enable_msi(struct pci_dev* dev)
699 if (!pci_msi_enable || !dev) 699 if (!pci_msi_enable || !dev)
700 return status; 700 return status;
701 701
702 if (dev->no_msi)
703 return status;
704
702 temp = dev->irq; 705 temp = dev->irq;
703 706
704 if ((status = msi_init()) < 0) 707 if ((status = msi_init()) < 0)
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index d94d7af4f7a0..fa36094aa0f9 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -46,7 +46,7 @@ extern int pci_msi_quirk;
46#else 46#else
47#define pci_msi_quirk 0 47#define pci_msi_quirk 0
48#endif 48#endif
49 49void disable_msi_mode(struct pci_dev *dev, int pos, int type);
50extern int pcie_mch_quirk; 50extern int pcie_mch_quirk;
51extern struct device_attribute pci_dev_attrs[]; 51extern struct device_attribute pci_dev_attrs[];
52extern struct class_device_attribute class_device_attr_cpuaffinity; 52extern struct class_device_attribute class_device_attr_cpuaffinity;
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index a9160ad16581..bb36bb69803f 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1291,6 +1291,27 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, quir
1291DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_pcie_mch ); 1291DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_pcie_mch );
1292DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_pcie_mch ); 1292DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_pcie_mch );
1293 1293
1294
1295/*
1296 * It's possible for the MSI to get corrupted if shpc and acpi
1297 * are used together on certain PXH-based systems.
1298 */
1299static void __devinit quirk_pcie_pxh(struct pci_dev *dev)
1300{
1301 disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
1302 PCI_CAP_ID_MSI);
1303 dev->no_msi = 1;
1304
1305 printk(KERN_WARNING "PCI: PXH quirk detected, "
1306 "disabling MSI for SHPC device\n");
1307}
1308DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXHD_0, quirk_pcie_pxh);
1309DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXHD_1, quirk_pcie_pxh);
1310DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_0, quirk_pcie_pxh);
1311DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_1, quirk_pcie_pxh);
1312DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXHV, quirk_pcie_pxh);
1313
1314
1294static void __devinit quirk_netmos(struct pci_dev *dev) 1315static void __devinit quirk_netmos(struct pci_dev *dev)
1295{ 1316{
1296 unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4; 1317 unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4;