summaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-01-05 14:50:27 +0100
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-01-07 11:13:25 -0800
commit16cf0ebc35dd63f72628ba1246132a6fd17bced2 (patch)
tree502bfcaac930695eb7f4ff8d7748f913b9accb83 /include/linux/pci.h
parentef1bba28bfe68ef3c0488feeaabd3e8bc523130c (diff)
downloadlinux-16cf0ebc35dd63f72628ba1246132a6fd17bced2.tar.gz
linux-16cf0ebc35dd63f72628ba1246132a6fd17bced2.tar.bz2
linux-16cf0ebc35dd63f72628ba1246132a6fd17bced2.zip
x86/PCI: Do not use interrupt links for devices using MSI-X
pcibios_enable_device() and pcibios_disable_device() don't handle IRQs for devices that have MSI enabled and it should treat the devices with MSI-X enabled in the same way. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 0f6d2bb1df9c..80f8b8b65fde 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -336,6 +336,15 @@ struct pci_bus {
#define pci_bus_b(n) list_entry(n, struct pci_bus, node)
#define to_pci_bus(n) container_of(n, struct pci_bus, dev)
+#ifdef CONFIG_PCI_MSI
+static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev)
+{
+ return pci_dev->msi_enabled || pci_dev->msix_enabled;
+}
+#else
+static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev) { return false; }
+#endif
+
/*
* Error values that may be returned by PCI functions.
*/