On Sat, 22 Apr 2006, usb usb wrote: > Thanks, that's a good one - I didn't knew it.. > > What if I want to do a hard reset of the device? How > do I do that kind of reset - of course, I wouldn't > want to physically disconnect and reconnect the > device?
I'm not sure what you mean by "hard reset". That term isn't used in the USB specification. If you want to turn off the bus power to the device, exactly as though it had been unplugged, you're out of luck. There's no way to do it; the hardware on PC's USB controllers won't turn off the power to any ports. If you want to do a USB port reset, then calling usb_reset_device is the way to go. If you do this from within your probe routine then you don't even need to worry about locking. > Do I have to do usb_put_dev () for it, and then search > for it from the beginning? No. I don't understand what you're worried about here. Perhaps you want to know what happens if the device really does change state following the reset. For example, let's say you have loaded new firmware which takes effect when the reset happens, and as a result the device's descriptors after the reset are different from the descriptors beforehand. In that case the usb_reset_device routine will return an error code, so your driver will know that something funny happened during the reset. You can simply have your probe routine return the same error code. The USB core treats it the same as though the device had been unplugged and then plugged in again. This means your driver (or possibly a different driver) will be re-probed with a new usb_device structure. 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