On Mon, 24 Apr 2006, usb usb wrote: > > More or less right. The idea is that if anything > > goes wrong, the old > > device structure is removed -- hence the ENODEV. > > When a new device > > structure is created, the drivers will be re-probed. > > So your code doesn't need to do anything special. > > How does this re-probing happen? Does USB core > re-register my driver on its own or do I have to do > it?
The USB core re-registers the device on its own, and that re-registration causes your driver's probe routine to be called. > > > And, what's the advantage/disadvantage of going > > with > > > this route or with usb_reset_dev? > > > > This _is_ the usb_reset_device route. > > > > What I meant was, is it better to return ENODEV > directly from probe when I find a failed device, or is > it better to call usb_reset_device, and let it handle. It depends. If you think usb_reset_device is likely to improve the situation, then go ahead and call it. Remember, though, that devices automatically get reset when they are plugged in to the computer, so another reset may not help. Remember also that you can easily get stuck in an infinite loop if the reset doesn't fix the problem. It's always safe to print a warning message to the system log and have your probe routine return an error. The error should not be -ENODEV, however -- that particular code means some other driver's probe routine should be tried. Alan Stern ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users