aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/pci/pcie/portdrv.h
diff options
context:
space:
mode:
authorGabriele Paoloni <gabriele.paoloni@huawei.com>2017-05-23 15:23:58 +0100
committerBjorn Helgaas <bhelgaas@google.com>2017-06-16 18:04:13 -0500
commita1d5f18cafe6b81696e60ca4901709d2f807362c (patch)
tree8f7cbc9c642cdd9fe11185d3429c74e9bfa1a416 /drivers/pci/pcie/portdrv.h
parentLinux 4.12-rc1 (diff)
downloadwireguard-linux-a1d5f18cafe6b81696e60ca4901709d2f807362c.tar.xz
wireguard-linux-a1d5f18cafe6b81696e60ca4901709d2f807362c.zip
PCI/portdrv: Support multiple interrupts for MSI as well as MSI-X
Root Ports can generate several different interrupts using either MSI or MSI-X, but we only support that for MSI-X. Ports that support MSI but not MSI-X are currently limited to sharing a single interrupt. Rename pcie_port_enable_msix() to pcie_port_enable_irq_vec() and extend it to support multiple interrupts using either MSI-X (preferred) or MSI. Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com> [bhelgaas: changelog, reword comments, simplify PME/hotplug no-MSI logic] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/pci/pcie/portdrv.h')
-rw-r--r--drivers/pci/pcie/portdrv.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h
index 587aef36030d..4334fd5d7de9 100644
--- a/drivers/pci/pcie/portdrv.h
+++ b/drivers/pci/pcie/portdrv.h
@@ -13,10 +13,11 @@
#define PCIE_PORT_DEVICE_MAXSERVICES 5
/*
- * According to the PCI Express Base Specification 2.0, the indices of
- * the MSI-X table entries used by port services must not exceed 31
+ * The PCIe Capability Interrupt Message Number (PCIe r3.1, sec 7.8.2) must
+ * be one of the first 32 MSI-X entries. Per PCI r3.0, sec 6.8.3.1, MSI
+ * supports a maximum of 32 vectors per function.
*/
-#define PCIE_PORT_MAX_MSIX_ENTRIES 32
+#define PCIE_PORT_MAX_MSI_ENTRIES 32
#define get_descriptor_id(type, service) (((type - 4) << 8) | service)