On Mon, 10 Jan 2005, CG wrote:

> Hello,
> 
> Just to explain the problem,  (processor : at91rm9200)
> 
> 
> When I install the g_file_storage module() and plug my usb device, I got
> some problems.
> 
> The usb device has correctly been configured. The USB device's using 1 bulk
> in and 1 bulk out endpoints.  After configuration state, the usb device
> receives the CBW block...
> 
> 55 53 42 43 1 0 0 0 ff 0 0 0 80 0 6 12 0 0 0 ff 0 0 0 0 0 0 0 0 0 0 0
> 
> I complete the request and after, I really don't understand what to do.

You're speaking figuratively, right?  _You_ don't complete the request, 
g_file_storage does.  Or maybe the udc driver does; it's not clear which 
you mean.  So when you say you don't understand what to do, do you mean 
that _you_ don't understand or the udc driver doesn't understand?

Or maybe you mean that _you_ don't understand what the udc driver should 
do.  The answer is simple: After completing a request, wait for the next 
request or packet to arrive.

>  The
> udc receives some dequeue and fifo flush requests.  I got an other debug
> message too (maybe from the host)... usb_control/bulk_msg: timeout!

That particular CBW will cause g_file_storage to stall the bulk-in 
endpoint, unless you invoke it with the "stall=no" parameter.  Maybe your 
udc driver has problems implementing the stall?

> (ex.:)
> 
> at91rm9200_udc:at91_ep_dequeue: called.
> 
> at91rm9200_udc:at91_ep_fifo_flush: called.
> 
> at91rm9200_udc:at91_ep_dequeue: called.

Those may come from g_file_storage carrying out a class-specific device 
reset.

> usb_control/bulk_msg: timeout

This may be a failure of your udc to complete the status stage of the 
device reset control message.  Or maybe g_file_storage is hung, waiting 
for your udc to carry out the stall.

> The udc received also an other bulk out containing CBW block again.

Not surprising; the host probably decided to retry the command when the 
first attempt failed.

> Is there any way (or docs) to understand how to handling udc interface
> correctly with gadget drivers?

Add debugging statements to your UDC at all the important entry points
that can be invoked by the gadget driver.  See if the driver actually
carries them out correctly.

Also, you can get more information by editing the gadget/file-storage.c 
source file and enabling the various debugging options, if you haven't 
done this already.

Alan Stern



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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