summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2016-08-11 16:11:05 +0200
committerBjorn Helgaas <bhelgaas@google.com>2016-08-18 15:02:40 +0200
commit5d0bdf2867825a92c0a563957a2fb059149ab0d4 (patch)
treed48f58105d771aef446de3f032d124d348477d95 /drivers/pci
parentPCI: Use positive flags in pci_alloc_irq_vectors() (diff)
downloadlinux-5d0bdf2867825a92c0a563957a2fb059149ab0d4.tar.xz
linux-5d0bdf2867825a92c0a563957a2fb059149ab0d4.zip
PCI: Call pci_intx() when using legacy interrupts in pci_alloc_irq_vectors()
ahci currently insists on an explicit call to pci_intx() before falling back from MSI or MSI-X to legacy IRQs. As pci_intx() is a no-op if the command register already contains the right value it seems safe and useful to add this call to pci_alloc_irq_vectors() so that ahci can just use pci_alloc_irq_vectors(). Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/msi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 9233e7f62f47..593698e11f96 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -1200,8 +1200,11 @@ int pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
}
/* use legacy irq if allowed */
- if ((flags & PCI_IRQ_LEGACY) && min_vecs == 1)
+ if ((flags & PCI_IRQ_LEGACY) && min_vecs == 1) {
+ pci_intx(dev, 1);
return 1;
+ }
+
return vecs;
}
EXPORT_SYMBOL(pci_alloc_irq_vectors);