Messages in this thread | | | Date | Wed, 15 Nov 2006 14:20:47 -0500 | From | Jeff Garzik <> | Subject | Re: [PATCH] ALSA: hda-intel - Disable MSI support by default |
| |
Linus Torvalds wrote: > However, I really think that this should be a generic PCI layer thing. If > some device asks for MSI interrupts, the PCI layer should try to turn off > a INTx routing on its own. Asking drivers to do both is just silly, > especially since driver writers really shouldn't be expected to know about > all these issues (sure, the best ones do, but a lot of driver writers will > just say "it works for me"). > > So I don't think the HDA driver should need disable INTx on its own > explicitly.
Your thinking is correct, but there is one hitch.
As Roland noted, PCI layer /already/ does this for PCI-Express devices.
The reason we cannot do this in the generic layer for non-PCI-Ex is only the driver knows whether that PCI 2.2 bit was actually implemented in the device or mapped to some other weird behavior we don't want to touch. DISABLE-INTX is a new bit not present in PCI 2.1 (alas!!).
pci_intx() was my five minute solution to this problem, and it got moved outside of libata as soon as somebody needed the same thing :)
Maybe a better solution is letting the driver say "pci_dev->intx_ok = 1" right before it calls pci_enable_device().
And if we do this, we can follow through on another suggestion I made: disabling INTx on driver exit, to help eliminate any possibility of screaming interrupts after driver unload.
Jeff
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |