On Sun, 3 Apr 2005, Duncan Sands wrote: > Using usb_reset_device in a probe method (or pretty much > anywhere for that matter) seems to run the risk of getting > into an infinite loop of connect/disconnect calls. Suppose > the reset fails. Then the device will be disconnected then > reconnected. In the probe, usb_reset_device will be called > again. The reset fails, and everything happens again, and > again... How can this scenario best be avoided?
Things generally won't work out like this, since most of the failures of usb_reset_device involve not being able to re-enumerate or finding that the descriptors have changed (which would tend to break the loop). But what you outline is certainly possible. Right now we have no mechanism for avoiding such things. It would require special checking in usbcore. The best thing to look for would probably be too many resets in too short a time. Feel like writing a patch? 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