On Fri, 24 Jun 2005, Budde, Marco wrote: > Hi Alan, > > > When a driver is unloaded, usbcore sends a Set-Interface request to > select > > altsetting 0 on the device. This command is supposed to clear the > data > > toggles and reset all the endpoints in the interface. > > this could be the reason for our problem. I just had a look into the > code for the EP0 implementation. One of our developers has commented > out the EP0 stalling for INTERFACE, which was in the reference > code of the IC manufacturer. > > Do you know, how a device should react exactly, when receiving > the SET_INTERFACE request? Would it be correct to stall EP0?
>From the USB 2.0 specification, section 9.4.10: Some USB devices have configurations with interfaces that have mutually exclusive settings. This request allows the host to select the desired alternate setting. If a device only supports a default setting for the specified interface, then a STALL may be returned in the Status stage of the request. The intent here is that the device doesn't have to support the Set-Interface request if it only has one altsetting. If you don't support Set-Interface then you must return a STALL; otherwise the host will assume you do support it. >From section 9.1.1.5: Configuring a device or changing an alternate setting causes all of the status and configuration values associated with endpoints in the affected interfaces to be set to their default values. This includes setting the data toggle of any endpoint using data toggles to the value DATA0. If you wanted to quibble, you could argue that a Set-Interface command specifying the altsetting that's already installed doesn't count as _changing_ the altsetting and hence doesn't require the data toggles to be reset. Advocating this quibble would make you very unpopular. Alan Stern ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&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