On Friday 22 April 2005 12:17 pm, Alan Stern wrote: > Dave: > > What do you think of the idea of taking all the code to create and > register root hub devices out of all the HCDs and centralizing it in > usb_add_hcd? It could go right after the call to hcd->driver->start().
There's sort of a chicken/egg problem there. It "should" be easy to have the root hub creation pulled out of the HCDs, but it's not very obvious how to decouple its registration from its activation. I've always been annoyed by how that's done, but until recently we've been pretty much stuck with how Linux 2.2 did this ... ;) > Both ehci-hcd.c and ohci-hcd.c include the root-hub code in > two different pathways. It appears that the restart paths > (every time except the first) can pretty much ignore the > root hub. Is that correct? (But then why does ehci-hcd set > udev->state to USB_STATE_CONFIGURED?) The issue is that "re"start _is_ a start(), except fhat first time. I think the deal with EHCI is that sometimes it does a full reset in the restart() path, and that'd be trouble since usbcore expects that the root hub is still configured (like all other hubs) on resume. > ohci-hcd and sl811-hcd include a call to hub_set_power_budget. > It's not clear where the call should end up. Should the > power-budget value be stored in the struct usb_hcd, where > usb_add_hcd will be able to see it? That'd probly be a better solution, yes. It's really awkward where it is now ... and there's an annoying window where it's set wrong. Basically it's a board-specific thing that should be set up before the root hub gets activated. - Dave > Alan Stern > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > linux-usb-devel@lists.sourceforge.net > To unsubscribe, use the last form field at: > https://lists.sourceforge.net/lists/listinfo/linux-usb-devel > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel