[PATCH, RFC] PCI: use pci_intx_for_msi in pci_alloc_irq_vectors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alex pointed out that we might want to use pci_intx_for_msi in
pci_alloc_irq_vectors for the case where allocating MSI or MSI-X vectors
fails completely.  I tried to read up the history behind pci_intx_for_msi,
but the changelogs seem a bit confusing, e.g. the comment in the tg3
around that code that was replaced by this quirk only talk about
_disabling_ INT-X.  Maybe someone can help me to shed some light about
this workaround, and help answering the question wether we need it
in this case.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Cc: David Miller <davem@xxxxxxxxxxxxx>
Cc: Shane Huang <shane.huang@xxxxxxx>
---
 drivers/pci/msi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 9da5ecb..a4b443f 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -1215,7 +1215,7 @@ 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) {
-		pci_intx(dev, 1);
+		pci_intx_for_msi(dev, 1);
 		return 1;
 	}
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux