summaryrefslogtreecommitdiff
path: root/backport/backport-include/linux/pci.h
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2018-12-01 22:38:24 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2018-12-03 21:17:25 +0100
commit1e4822d1394ab7e192eff168a0c1b3c7c4ca24ff (patch)
tree80f06e4be926a35dfc6301b1cadc3e59e7c45a5e /backport/backport-include/linux/pci.h
parent35c0c4c5ba3867a66b84a6fe7fb4415deba5ef20 (diff)
backports: Fix pci_alloc_irq_vectors() backport
This copies the pci_alloc_irq_vectors() function from kernel 4.9 and replaces the __pci_enable_msi{x}_range() calls with calls to pci_enable_msi{x}_range(), these were backported to kernel versions < 3.14, so no need to handle the older kernels specially here. This also adds support for MSIx IRQs and adds the PCI_IRQ_* defines. Fixes: 162a6b312f1b ("add support for pci_alloc_irq_vectors") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Cc: Omer Dagan <omer.dagan@tandemg.com>
Diffstat (limited to 'backport/backport-include/linux/pci.h')
-rw-r--r--backport/backport-include/linux/pci.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/backport/backport-include/linux/pci.h b/backport/backport-include/linux/pci.h
index 531f5a47..3a141bf3 100644
--- a/backport/backport-include/linux/pci.h
+++ b/backport/backport-include/linux/pci.h
@@ -224,4 +224,12 @@ static inline struct pci_dev *pcie_find_root_port(struct pci_dev *dev)
#endif/* <4.9.0 but not >= 3.12.69, 4.4.37, 4.8.13 */
+#ifndef PCI_IRQ_LEGACY
+#define PCI_IRQ_LEGACY (1 << 0) /* Allow legacy interrupts */
+#define PCI_IRQ_MSI (1 << 1) /* Allow MSI interrupts */
+#define PCI_IRQ_MSIX (1 << 2) /* Allow MSI-X interrupts */
+#define PCI_IRQ_ALL_TYPES \
+ (PCI_IRQ_LEGACY | PCI_IRQ_MSI | PCI_IRQ_MSIX)
+#endif
+
#endif /* _BACKPORT_LINUX_PCI_H */