On Mon, 28 Nov 2005, David Brownell wrote: > But there's a related point, that usb_add_hcd() sequences things in a > pretty strange order. For one thing, the root hub isn't created at > the time that misnamed reset/init/setup routine is called ... which > means that one-time root hub customization must be done elsewhere, in > some routine that's not for one-time setup. Of course I have a patch > for that; but that calls for a bit more testing.
What root hub customization? What sorts of things need to be set up specially for the root hub device? Offhand I don't see anything in struct usb_device that could be customized. Speaking of refactoring, the hcd->start and ->stop routines are also a bit strange. For example, the start method in uhci-hcd.c does a lot of the work that should be done in an init method, and it duplicates some of the work done by resume. Maybe it would make more sense to have the method formerly known as "reset" prepare almost everything, leaving the hardware essentially in bus-suspend state. Then instead of calling start, we could just call bus_resume. Likewise, for remove processing we would call bus_suspend followed by a new "destroy" method. Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&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