On Thu, 7 Dec 2006, Duncan Sands wrote: > > > I personally think that loading firmware in the probe routine is okay > > > and I fully agree with you that the less complexity in the driver the > > > better. Loading the firmware will almost always have to block since the > > > device can't be used before the firmware loading has been finished. > > > > If you take that thought to its logical conclusion you make firmware > > an attribute of the driver and let usbcore request it. > > That's what the usbatm subsystem does. USB ATM modems register themselves > with usbatm. They can provide a "heavy_init" method (mostly used for loading > firmware). If it is provided, then usbatm runs heavy_init in another thread > after probing the modem driver. usbatm also takes care of making sure the > thread has stopped running when the modem is disconnected. That way the > individual modem drivers can easily load firmware etc as if in the probe > method without having to worry about solving for themselves all the problems > (mainly race conditions) involved in loading firmware from another thread. > usbcore could provide something like this.
Could you write a patch to move the "heavy_init" support from usbatm into usbcore? It sounds like it belongs there. Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel