Commit 5d0bdf28 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Bjorn Helgaas

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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 4fe0d154
...@@ -1200,8 +1200,11 @@ int pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs, ...@@ -1200,8 +1200,11 @@ int pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
} }
/* use legacy irq if allowed */ /* 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 1;
}
return vecs; return vecs;
} }
EXPORT_SYMBOL(pci_alloc_irq_vectors); EXPORT_SYMBOL(pci_alloc_irq_vectors);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment