On Fri, 8 Aug 2003, Oliver Neukum wrote: > > After usb_device_reset() and usb_set_configuration() carry out their > > physical actions, they merely need to disable all the endpoints on the > > device (except maybe ep0), set the state to the correct value, and post > > the state_change request. The hub thread will handle all the rest. > > No, you must disable the endpoints before you do the requested action. > Otherwise there's a race where drivers will send data to endpoints belonging > to interfaces they no longer own.
Thank you. You're right, of course. In fact, the routines should copy the current code up to the point where the physical action is taken. Another aspect I neglected to mention before is that usb_reset_device() must not leave the device is the DEFAULT state, waiting for the hub thread to assign it an address. It must assign the address immediately. 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