aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pcieport_if.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-01-23 18:23:22 -0500
committerJesse Barnes <jbarnes@hobbes.lan>2009-03-19 22:29:25 -0400
commitb43d451385ef833e0696032aac2629da04d46c59 (patch)
tree8bc4e838fdef893934d2cee19ae8f2629549bd4f /include/linux/pcieport_if.h
parenta52e2e3513d4beafe8fe8699f1519b021c2d05ba (diff)
PCI/PCIe portdrv: Fix allocation of interrupts
If MSI-X interrupt mode is used by the PCI Express port driver, too many vectors are allocated and it is not ensured that the right vectors will be used for the right services. Namely, the PCI Express specification states that both PCI Express native PME and PCI Express hotplug will always use the same MSI or MSI-X message for signalling interrupts, which implies that the same vector will be used by both of them. Also, the VC service does not use interrupts at all. Moreover, is not clear which of the vectors allocated by pci_enable_msix() in the current code will be used for PME and hotplug and which of them will be used for AER if all of these services are configured. For these reasons, rework the allocation of interrupts for PCI Express ports so that if MSI-X are enabled, the right vectors will be used for the right purposes. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Reviewed-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include/linux/pcieport_if.h')
-rw-r--r--include/linux/pcieport_if.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/pcieport_if.h b/include/linux/pcieport_if.h
index a3832079508e..5d2afcfa6bc1 100644
--- a/include/linux/pcieport_if.h
+++ b/include/linux/pcieport_if.h
@@ -16,10 +16,14 @@
16#define PCIE_ANY_PORT 7 16#define PCIE_ANY_PORT 7
17 17
18/* Service Type */ 18/* Service Type */
19#define PCIE_PORT_SERVICE_PME 1 /* Power Management Event */ 19#define PCIE_PORT_SERVICE_PME_SHIFT 0 /* Power Management Event */
20#define PCIE_PORT_SERVICE_AER 2 /* Advanced Error Reporting */ 20#define PCIE_PORT_SERVICE_PME (1 << PCIE_PORT_SERVICE_PME_SHIFT)
21#define PCIE_PORT_SERVICE_HP 4 /* Native Hotplug */ 21#define PCIE_PORT_SERVICE_AER_SHIFT 1 /* Advanced Error Reporting */
22#define PCIE_PORT_SERVICE_VC 8 /* Virtual Channel */ 22#define PCIE_PORT_SERVICE_AER (1 << PCIE_PORT_SERVICE_AER_SHIFT)
23#define PCIE_PORT_SERVICE_HP_SHIFT 2 /* Native Hotplug */
24#define PCIE_PORT_SERVICE_HP (1 << PCIE_PORT_SERVICE_HP_SHIFT)
25#define PCIE_PORT_SERVICE_VC_SHIFT 3 /* Virtual Channel */
26#define PCIE_PORT_SERVICE_VC (1 << PCIE_PORT_SERVICE_VC_SHIFT)
23 27
24/* Root/Upstream/Downstream Port's Interrupt Mode */ 28/* Root/Upstream/Downstream Port's Interrupt Mode */
25#define PCIE_PORT_NO_IRQ (-1) 29#define PCIE_PORT_NO_IRQ (-1)