Re: usbtest and pattern=1

Alan Stern <[email protected]> Tue, 15 Jan 2008 10:32:34 -0500 (EST)
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Tue, 15 Jan 2008, David Brownell wrote:

> On Tuesday 15 January 2008, Matthieu CASTET wrote:

> > So if on the host we send data on the bulk endpoint after the 
> > set_altsetting but the device isn't fast enough, the usb_ep_enable & 
> > usb_ep_queue won't be done and we can lose packet due to the flush.
> > 
> > How the sync between host and device is supposed to work ?
> 
> The peripheral doesn't return from SET_INTERFACE (set_altsetting)
> until after the endpoints are enabled.

At a lower level, the peripheral doesn't ACK the Status stage of the
Set-Interface request until all the operations (re-enabling endpoints,
flushing fifos, etc.) are finished.  The gadget driver insures this by
not returning from its setup routine until everything is ready.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel