Dear All,

How should a gadgetfs application cause an ACK to be sent to the host 
in response to a sucessfully received and processed control out transaction?

My first guess was to send a zero-byte write, but looking at the 
example gadgetfs program (http://www.linux-usb.org/gadget/usb.c), the 
only control out transactions that it handles are SET_CONFIGURATION and 
SET_INTERFACE, and it acks these with a zero-byte read:

                /* ... ack (a write would stall) */
                status = read (fd, &status, 0);

This does indeed work in these cases, but I have tried doing it for 
other control out transactions (i.e. type=vendor), where as far as I 
can see it doesn't work; the host never sees the ack and eventually 
times out.  There's a good chance that I'm doing something stupid, but 
I'd like to understand whether I really should be doing reads or 
whether this is a special case for these particular control 
transactions.  When I try doing a zero-byte write for the type=vendor 
transactions I get "Level 2 halted" (EL2HLT), which I suspect is the 
"write would stall" that the comment in usb.c is alluding to.

Any suggestions anyone?

Thanks, and Happy New Year.

Phil.

(You are welcome to CC me in any replies)





-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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