Dmitri:

The usb_reset_device() function in 2.6.0 will get an overhaul in the near 
future.  I hope this will address the problems you raised.

On Tue, 19 Aug 2003, Dmitri Katchalov wrote:

> BTW while I am at it I have one particular issue with usb_reset_device():
> - If you want to reset the device you own you have to release the 
> interface before calling reset and then reclaim it back afterwards as
> usb_destroy_configuration wipes out usb_interface without releasing any 
> attached drivers.

You will not have to release the interface beforehand.  If 
usb_reset_device() sees that the device has not changed as a result of the 
reset (i.e., if the descriptors agree with their previous values) then 
your driver will retain its interface binding and the interface will 
automatically be set to the same altsetting it had before the reset.

On the other hand, if the device's descriptors have changed then your 
driver's disconnect() routine will be called, followed sometime later by a 
call to probe() referring to the new usb_interface.

> - When you release the interface it tries to set default altsetting for the 
> interface by sending it a corresponding control URB. At this point in time 
> the device is waiting for a reset and not responding to any commands. This 
> causes set_interface to time out. 

The code will not explicitly try to install the default altsetting for any 
interfaces.  Any altsetting messages will be sent after the device has 
been configured.

Alan Stern



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to