* pci_alloc_irq_vectors use in 8250_lpss.c
@ 2016-10-09 17:56 Christoph Hellwig
2016-10-09 22:01 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2016-10-09 17:56 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-kernel
Hi Andy,
two comment on your ぱatch to add MSI support to the above driver.
First pci_alloc_irq_vectors gained a mandatory flags argument, so
for MSI suport you now need to pass PCI_IRQ_MSI in flags for the
code to work.
Second please make sure to always pair pci_alloc_irq_vectors
with pci_free_irq_vectors on the remove path.
Thanks,
Christoph
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: pci_alloc_irq_vectors use in 8250_lpss.c
2016-10-09 17:56 pci_alloc_irq_vectors use in 8250_lpss.c Christoph Hellwig
@ 2016-10-09 22:01 ` Andy Shevchenko
2016-10-09 22:20 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2016-10-09 22:01 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Andy Shevchenko, linux-kernel@vger.kernel.org
On Sun, Oct 9, 2016 at 8:56 PM, Christoph Hellwig <hch@lst.de> wrote:
> Hi Andy,
>
> two comment on your ぱatch to add MSI support to the above driver.
>
> First pci_alloc_irq_vectors gained a mandatory flags argument, so
> for MSI suport you now need to pass PCI_IRQ_MSI in flags for the
> code to work.
I will check this. Thanks for pointing to it.
>
> Second please make sure to always pair pci_alloc_irq_vectors
> with pci_free_irq_vectors on the remove path.
For my opinion it should be done in PCI code since I'm using
manageable resources. It's already done for all PCI API usually used
at ->probe().
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: pci_alloc_irq_vectors use in 8250_lpss.c
2016-10-09 22:01 ` Andy Shevchenko
@ 2016-10-09 22:20 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2016-10-09 22:20 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Andy Shevchenko, linux-kernel@vger.kernel.org
On Mon, Oct 10, 2016 at 1:01 AM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Sun, Oct 9, 2016 at 8:56 PM, Christoph Hellwig <hch@lst.de> wrote:
>> Hi Andy,
>>
>> two comment on your ぱatch to add MSI support to the above driver.
>>
>> First pci_alloc_irq_vectors gained a mandatory flags argument, so
>> for MSI suport you now need to pass PCI_IRQ_MSI in flags for the
>> code to work.
>
> I will check this. Thanks for pointing to it.
Yeah, this has to be amended.
>
>>
>> Second please make sure to always pair pci_alloc_irq_vectors
>> with pci_free_irq_vectors on the remove path.
>
> For my opinion it should be done in PCI code since I'm using
> manageable resources. It's already done for all PCI API usually used
> at ->probe().
Nothing is required to do until you don't use some specific code. If
you plan extend *_free_*() function in the future, please, consider
manageable resources and automatic releasing.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-09 22:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-09 17:56 pci_alloc_irq_vectors use in 8250_lpss.c Christoph Hellwig
2016-10-09 22:01 ` Andy Shevchenko
2016-10-09 22:20 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox