Thread (19 messages) 19 messages, 3 authors, 2024-08-08

Re: [PATCH v4 1/8] misc: Add support for LAN966x PCI device

From: Andy Shevchenko <hidden>
Date: 2024-08-08 12:32:46
Also in: linux-arm-kernel, linux-pci, lkml, netdev

On Wed, Aug 7, 2024 at 1:10 PM Herve Codina [off-list ref] wrote:
On Mon, 5 Aug 2024 22:13:38 +0200
Andy Shevchenko [off-list ref] wrote:
quoted
On Mon, Aug 5, 2024 at 12:19 PM Herve Codina [off-list ref] wrote:
...
quoted
quoted
+       if (!pdev->irq)
+               return ERR_PTR(-EOPNOTSUPP);
Before even trying to get it via APIs? (see below as well)
Also, when is it possible to have 0 here?
pdev->irq can be 0 if the PCI device did not request any IRQ
(i.e. PCI_INTERRUPT_PIN in PCI config header is 0).
I use that to check whether or not INTx is supported.
But why do you need that? What happens if you get a new device that
supports let's say MSI?
Even if this code is present in the LAN966x PCI driver, it can be use as a
starting point for other drivers and may be moved to a common part in the
future.

Do you think I should remove it ?
I think pci_alloc_vectors() should be enough. Make it to be the first
call, if you think it's better.
If keeping it is fine, I will add a comment.

-- 
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help