Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1497990 > unrolled thread

pci_alloc_irq_vectors use in 8250_lpss.c

Started byChristoph Hellwig <hch@lst.de>
First post2016-10-09 20:00 +0200
Last post2016-10-10 00:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  pci_alloc_irq_vectors use in 8250_lpss.c Christoph Hellwig <hch@lst.de> - 2016-10-09 20:00 +0200
    Re: pci_alloc_irq_vectors use in 8250_lpss.c Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-10-10 00:10 +0200
      Re: pci_alloc_irq_vectors use in 8250_lpss.c Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-10-10 00:30 +0200

#1497990 — pci_alloc_irq_vectors use in 8250_lpss.c

FromChristoph Hellwig <hch@lst.de>
Date2016-10-09 20:00 +0200
Subjectpci_alloc_irq_vectors use in 8250_lpss.c
Message-ID<sqqyd-7eo-9@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1498024

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2016-10-10 00:10 +0200
Message-ID<squsa-1oi-13@gated-at.bofh.it>
In reply to#1497990
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

[toc] | [prev] | [next] | [standalone]


#1498026

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2016-10-10 00:30 +0200
Message-ID<squLw-1ya-7@gated-at.bofh.it>
In reply to#1498024
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web