On Wed, 15 Nov 2006 11:31:04 +0100
Takashi Iwai <[email protected]> wrote:
> At Tue, 14 Nov 2006 19:21:17 -0800 (PST),
> David Miller wrote:
> >
> > From: Linus Torvalds <[email protected]>
> > Date: Tue, 14 Nov 2006 19:10:42 -0800 (PST)
> >
> > > Yours was still an example of "nice". And it had absolutely nothing
> > > to do with the _PROBLEM_.
> >
> > Understood.
> >
> > BTW, some drivers have taken the approch to add MSI self-tests
> > inside of the driver to ensure correct option of MSI on a given
> > machine. There's a lot of resistence to that, the reasons for
> > which I grok fully, but I'm not sure other suggestions such as
> > black lists are any better.
>
> The snd-hda-intel driver has a test of MSI, but it seems not working
> on every machine. It caused non-cared interrupts and the kernel
> disabled that irq.
>
> > Given current experience maybe white-lists are in fact the way
> > to go.
>
> Could it be whitelisted in the PCI driver side? I don't think it's
> good to have a huge white/blacklist in each device driver.
>
A whitelist is an awkward solution, the problem is the number of
chipsets available with MSI will continue to grow. And the assumption
is that after Microsoft OS supports MSI, that newer chipsets will work.
So by having a whitelist, you force a growing whitelist (in the kernel)
to know about all the possible chipsets. Since non-whitelisted systems
will end up using INTX and working fine, most users will never try MSI
and the whitelist will end up stale.
A better solution is to have more robust IRQ management that can
deal with misrouted IRQ's and try and recover correctly. How hard would
it be to:
* remember original IRQ before MSI was enabled
* make sure all MSI irq's are not flagged SHARED
* in case of bogus IRQ walk the list and try and correct
the problem by reverting to INTX mode.
* add interface?
pci_request_irq_msi(pdev, regular_irq_handler, msi_irq_handler, flags, name, context)
All this should be done by the MSI layer, not the device drivers.
--
Stephen Hemminger <[email protected]>
> A whitelist is an awkward solution, the problem is the number of
> chipsets available with MSI will continue to grow. And the assumption
> is that after Microsoft OS supports MSI, that newer chipsets will work.
Maybe a whitelist for older systems and then enable everything after a
DMI cutoff date by default? Doesn't work on non-PC stuff though...
- R.