summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-09-10 16:35:40 -0600
committerBjorn Helgaas <bhelgaas@google.com>2012-09-10 16:35:40 -0600
commita690a4cbf09f70723f9721ca96ab8b2b472b3391 (patch)
tree891858bf8e351a2a9eb907e5075d02f721aceea6 /drivers/pci
parent5aaa71cf12f998e7073e36e8efa45d45656d9ace (diff)
parente237d83fdf0313d26af46f41b69b3b87d62669c0 (diff)
downloadlinux-a690a4cbf09f70723f9721ca96ab8b2b472b3391.tar.bz2
Merge branch 'pci/shengzhou-irq' into next
* pci/shengzhou-irq: PCI: Use dev->irq instead of dev->pin to enable non MSI/INTx interrupt
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pcie/portdrv_core.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index aede99171e90..d03a7a39b2d8 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -200,10 +200,13 @@ static int init_service_irqs(struct pci_dev *dev, int *irqs, int mask)
{
int i, irq = -1;
- /* We have to use INTx if MSI cannot be used for PCIe PME or pciehp. */
+ /*
+ * If MSI cannot be used for PCIe PME or hotplug, we have to use
+ * INTx or other interrupts, e.g. system shared interrupt.
+ */
if (((mask & PCIE_PORT_SERVICE_PME) && pcie_pme_no_msi()) ||
((mask & PCIE_PORT_SERVICE_HP) && pciehp_no_msi())) {
- if (dev->pin)
+ if (dev->irq)
irq = dev->irq;
goto no_msi;
}
@@ -212,8 +215,12 @@ static int init_service_irqs(struct pci_dev *dev, int *irqs, int mask)
if (!pcie_port_enable_msix(dev, irqs, mask))
return 0;
- /* We're not going to use MSI-X, so try MSI and fall back to INTx */
- if (!pci_enable_msi(dev) || dev->pin)
+ /*
+ * We're not going to use MSI-X, so try MSI and fall back to INTx.
+ * If neither MSI/MSI-X nor INTx available, try other interrupt. On
+ * some platforms, root port doesn't support MSI/MSI-X/INTx in RC mode.
+ */
+ if (!pci_enable_msi(dev) || dev->irq)
irq = dev->irq;
no_msi: