On Fri, 1 Jul 2005, Duncan Sands wrote: > Hi Alan, > > > > Suppose my driver's probe method is called for a device, > > > some initialisation is done (eg: I change the altsetting), > > > but finally the probe fails. Will the device state be > > > reset in any way before other drivers are probed? > > > > No. Do you think selecting altsetting 0 will reset the state > > sufficiently? If not, what more can usbcore reset? > > > > Would you like to write a patch that installs altsetting 0 following every > > failed probe? > > but do we want to guarantee that the altsetting is always zero > when probe is called (likewise for configuration)? After all, drivers > can be responsible for setting the values they want.
I think we do. Drivers should find their devices initially in the default state. That's why we install altsetting 0 after each driver unbinds. > Also, wouldn't setting > the altsetting to zero result in traffic with the device even if the > altsetting was already zero...? It would. But the overhead should be pretty small; failures during probe don't occur very often. Less often than probes overall, and they aren't very common. Furthermore, even if the altsetting already is 0, sending the command should force the interface to do a partial reset. Alan Stern ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&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