* [PATCH, RFC] PCI: use pci_intx_for_msi in pci_alloc_irq_vectors
@ 2016-09-11 7:09 Christoph Hellwig
2016-09-20 19:46 ` Bjorn Helgaas
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2016-09-11 7:09 UTC (permalink / raw)
To: agordeev, linux-pci; +Cc: davem, shane.huang
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@lst.de>
Cc: David Miller <davem@davemloft.net>
Cc: Shane Huang <shane.huang@amd.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH, RFC] PCI: use pci_intx_for_msi in pci_alloc_irq_vectors
2016-09-11 7:09 [PATCH, RFC] PCI: use pci_intx_for_msi in pci_alloc_irq_vectors Christoph Hellwig
@ 2016-09-20 19:46 ` Bjorn Helgaas
2016-09-20 20:03 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2016-09-20 19:46 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: agordeev, linux-pci, davem, shane.huang
Hi Christoph,
On Sun, Sep 11, 2016 at 09:09:27AM +0200, Christoph Hellwig wrote:
> 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.
If we want to do this, I'd like to have a changelog that explains
*why*, so I'm ignoring it for now. I'm not nacking it; I just don't
understand why we should do it yet, and I'm too lazy to do all the
research myself.
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Cc: David Miller <davem@davemloft.net>
> Cc: Shane Huang <shane.huang@amd.com>
> ---
> 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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH, RFC] PCI: use pci_intx_for_msi in pci_alloc_irq_vectors
2016-09-20 19:46 ` Bjorn Helgaas
@ 2016-09-20 20:03 ` Christoph Hellwig
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2016-09-20 20:03 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: Christoph Hellwig, agordeev, linux-pci, davem, shane.huang
On Tue, Sep 20, 2016 at 02:46:14PM -0500, Bjorn Helgaas wrote:
> If we want to do this, I'd like to have a changelog that explains
> *why*, so I'm ignoring it for now. I'm not nacking it; I just don't
> understand why we should do it yet, and I'm too lazy to do all the
> research myself.
Can't blame you. Alex pointed me to the function, and it seems like a
good idea, but research in git history just doesn't give me an conclusive
reason on why to do it either.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-20 20:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-11 7:09 [PATCH, RFC] PCI: use pci_intx_for_msi in pci_alloc_irq_vectors Christoph Hellwig
2016-09-20 19:46 ` Bjorn Helgaas
2016-09-20 20:03 ` Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.