ALSA: hda-intel - Disable MSI support by default
Quoted 10 lines
It all boils down to the same thing: either we have to know that MSI works (where "know" is obviously relative - it's not like you can avoid _all_ bugs, but dammit, even a single report of "not working" means that there are probably a ton of machines like that, and we did something wrong), or we shouldn't use it. There is no middle ground. You can't really safely "test" for it, and while you _can_ say "just do both", it doesn't really help anything (and potentially exposes you to just more bugs: if enablign MSI actually _does_ disable INTx, but then doesn't work, at a minimum you end up with a device that doesn't work, even if the rest of the kernel might be ok).
Er... why can't you test it?
The fundamental problem in IRQ routing is that if you have it wrong, you have a screaming interrupt that you can't shut up.
Well, before giving up entirely, assume that *some* device owns that interrupt, it's just mis-routed.
So start calling the IRQ handlers for *every* PCI device until the damn interrupt goes away, or you've really proved that it can't be shut up.
If you have interrupts coming in fast, you might have to retry a few times to be sure there's nothing to be done, but that's nothing new.
Now, if you get really nasty with the locking, you can disable all other interrupt handlers on all processors until you've dealt with the screaming interrupt, and when it goes away, you can point the finger conclusively at the device which has the misrouted interrupt. And you've also found where its interrupt *is* routed.
If you don't have such nasty locking, then you only have a strong suspiscion about what did it, but a few repetitions can firm that up. Any time a device handles an interrupt that arrived from the expected place, its index of suspiscion goes down. You can even use this to select an order to call the various PCI drivers.
All of this can be rather time-consuming and mess up real-time response, but it's only once per boot, and being able to point the finger accurately at buggy hardware rather than not working at all for mysterious reasons is quite nice. And an increasing number of BIOS vendors and OEMs are testing with Linux, even if only cursorily, so there is some (slow) feedback.
Whether you actually learn to cope with misrouted interrupts is a separate issue that I won't raise.
Quoted 6 lines · On 15 Nov 2006 23:24:32 -0500 [email protected] wrote:
Well, before giving up entirely, assume that *some* device owns that interrupt, it's just mis-routed.
So start calling the IRQ handlers for *every* PCI device until the damn interrupt goes away, or you've really proved that it can't be shut up.
See the "irqpoll" option. We don't however try and learn IRQ errors from it although we certainly could do so (and indeed Ingo semi jokingly suggested it when the patch went in)
Quoted 2 lines · On Wed, 15 Nov 2006, [email protected] wrote:
Er... why can't you test it?
Because if it is level-triggered kind of thing and comes in on the wrong IRQ, and that IRQ is already used by something else, you're basically dead.
IRQ probing is essentially unworkable. We support it for ISA cards (and "ISA" here tends to mean PCMCIA - there are almost no other ISA forms left), but it just doesn't work very well.
Quoted 6 lines
Well, before giving up entirely, assume that *some* device owns that interrupt, it's just mis-routed.
So start calling the IRQ handlers for *every* PCI device until the damn interrupt goes away, or you've really proved that it can't be shut up.
Sure, you can add crap upon crap upon crap for these things. I pretty much guarantee you that it's not going to work, though. Why? Because developers won't even be working on those machines that have irq routing problems, so they won't be testing things that way, and because if you have irq routing problems, your problems are so fundamental that it really isn't worth it any more.
We've added basic _debugging_ facilities (the whole "nobody cared" thing is really a debugging thing, not a "make it work" thing). That was big, because it used to be that a screaming interrupt just locked up the whole machine - notably you inserted a PCMCIA card, and the machine would just lock up (sometimes it would come back when you removed the card again).
Trying to work around it is basically not worthwhile. You need to fix the problem. Interrupts are very fundamental, you don't want to be guessing about them. If they are wrong, you're screwed.
Linus