On Mon, Jun 07, 2010 at 01:24:26PM -0400, Alan Stern wrote: > On Mon, 7 Jun 2010, Sarah Sharp wrote: > > > Do any other USB hosts support MSI/MSI-X? A quick grep in the > > drivers/usb/host/ directory says no. Are there any plans to add MSI > > support to a USB host? > > > > If so, it might be useful to introduce a new HCD driver function to > > enable MSI, which the USB core can call in usb_add_hcd(). The hosts > > could have a flag to indicate whether they are designed to handle > > MSI/MSI-X. > > > > If xHCI is the only driver that will support MSI, the other other option > > is to swap out the legacy interrupt under the USB core, when it calls > > the host's initialization function. That's a little ugly because it > > involves exporting the usb_hcd_irq() function and re-allocating the PCI > > interrupt if the MSI interrupt allocation fails (see the patch below). > > It seems like that error handling really should be done in the USB core. > > > > If no other host supports MSI, I think the method below is OK, but if > > other drivers need to support MSI, I think we can do this better. > > Keep in mind when you do this that usb_hcd_irq() is a public routine. > It does get called directly on occasion, when somebody wants to poll > the host controller instead of waiting for an interrupt. Whatever > changes you make should preserve the ability to poll the hardware in > this way. The only thing Dong's patch changed in the USB core with respect to the other host controllers that poll was to export the usb_hcd_irq() as EXPORT_SYMBOL_GPL. I think that's fine, since hosts have to be marked as GPL to call into a lot of USB core API. Sarah Sharp -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html