On Mon, 29 Nov 2010, Sarah Sharp wrote: > This patch requires changes in both the USB core and the xHCI host > controller driver to allow two roothubs (usb_hcd structures) to be > allocated for one xHCI PCI device. There are really three functional > changes included in this (rather long) patch, but there's no way to break > them up without breaking git-bisect: > > 1. Changes to the USB PCI code to allocate two usb_hcd structures, and > corresponding changes to the xHCI initialization and shutdown code. > The only really tricky bit is ensuring that the host controller doesn't > start kicking khubd in response to port status changes before both > usb_hcd structures are registered. xhci_run() only starts the xHC > running once it has been called with the USB 2.0 roothub. > > 2. Changes to the USB roothub emulation code to return the proper speed > and hub descriptors for each usb_hcd in the roothub pair. > > 3. Changes to the xHCI roothub emulation code to lookup the proper port > address in the two roothub port arrays, based on which usb_hcd is > passed in. There are also changes in the xHCI port status change > event handler. It needs to map the internal hardware port index into > the proper usb_hcd to kick khubd for. It indexes into an array of > port protocol versions to do this. > > When there's an issue that halts the xHCI host controller, we need to set > the hcd->state to HC_STATE_HALT for both shared roothubs (and possibly let > the USB core know *both* died). I haven't looked carefully at this, but it seems bigger than necessary. For example, when deciding whether a particular hcd is USB-2 or USB-3, you shouldn't need to check whether it is the "main" hcd of a pair. Just look at the HCD_MASK part of the flags. Alan Stern -- 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