Skip to contentSkip to conversation

pci_alloc_irq_vectors use in 8250_lpss.c

DISCUSSION Christoph Hellwig 2 participants 3 messages Oct 9, 2016

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 7 lines · Christoph Hellwig

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.

Quoted 3 lines

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().

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 10 lines · Andy Shevchenko
Quoted 7 lines · Christoph Hellwig

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.

Quoted 8 lines
Quoted 4 lines

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.

Signature · 2 lines
With Best Regards,
Andy Shevchenko