Re: [PATCH] Better fix for NIU MSI-X problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2009-05-14 at 04:28 -0600, Matthew Wilcox wrote:
> On Thu, May 14, 2009 at 01:41:59PM +1000, Michael Ellerman wrote:
> > On Wed, 2009-05-13 at 15:43 -0600, Matthew Wilcox wrote:
> > > +
> > > +	/*
> > > +	 * Some devices require MSI-X to be enabled before we can touch the
> > > +	 * MSI-X registers.  We need to mask all the vectors to prevent
> > > +	 * interrupts coming in before they're fully set up.
> > > +	 */
> > > +	pci_read_config_word(dev, pos + PCI_MSIX_FLAGS, &control);
> > > +	control |= PCI_MSIX_FLAGS_ENABLE | PCI_MSIX_FLAGS_MASKALL;
> > > +	pci_write_config_word(dev, pos + PCI_MSIX_FLAGS, control);
> > > +
> > 
> > I don't like this, sorry.
> > 
> > In particular it means we're enabling MSI before the call to
> > arch_setup_msi_irqs() - I worry if the pseries firmware is going to be
> > happy about that.
> 
> Could you try it?  

Not easily sorry. And just because it works on current firmware doesn't
mean it will continue to - having MSI-X enabled before asking the
firmware to enable it is asking for trouble IMHO :)

> BTW, you still owe me a reply on whether the pseries
> firmware allows us to allocate more irqs for a given function.

Sorry yeah that's still in my TODO folder. In short I think it
would /probably/ work - in practice I think it would suck because we
only have a limited number of MSIs per slot to start with.

For supporting your hot-add CPU and network card scenario I think we'd
be better off trying to push the API the other way, and say that the
driver needs to disable and then reenable with it's new desired number.

cheers

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux