On Mon, 23 Jan 2006, David Brownell wrote:

> > 
> > so, when the function is still busy completing command or the command
> > sequence failed to complete, how do gadget driver tell udc to response
> > Control writes with NAK/STALL?
> 
> The gadget driver only has to worry about telling the controller to
> complete the request (by submitting a usb_request in response), or
> stalling it (returning a fault code from the setup callback, or
> later setting an explicit halt).
> 
> One of the controller driver's responsibilities is to issue NAKs
> until the gadget driver decides which of those responses to use.

This was one of the things I never understood clearly: How does a gadget 
driver finish a control-OUT transfer?

The gadget driver submits a usb_request for the OUT data, and the
completion handler for that request gets called when the data arrives.  
How then does the gadget driver tell the controller driver that the data
has been processed successfully and it's okay to ACK the host's
status-stage IN packet?  By submitting another, zero-length usb_request?  
file_storage.c doesn't ever do that, but net2280 sends the ACK packet 
anyway.

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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
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