Dave:

I may have asked this before; if so I've forgotten the answer.

When a control request arrives on ep0 and the gadget has to do a lot of
processing before completing the data or status stages of the request,
there's a possibility that the host might time out and send another
request to ep0.  If this happens, there's ambiguity about which request
the data or status stage corresponds to.  The host will think it goes with
the second request, but the gadget driver may still be working on the
first.

To some extent the gadget driver can avoid this problem by keeping track 
of setup requests as they arrive.  Assign a tag number to each one, for 
example, and don't send a reply if the current tag is different from the 
reply's tag.  But there's still a race between the setup routine changing 
the current tag and the reply routine checking it.

There may be similar races in the controller driver and perhaps even in
the hardware.  How are these things supposed to be handled?

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&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

Reply via email to