Most of your decisions look good to me.
Have you given any thought to forward compatibility? I imagine it's
too early to worry about that yet.
Is this string intended to be meaningful to a human? Or could it be
nothing more than an ASCII version of the device structure's address?
A number of important commands are missing. Clear-Halt springs to
mind, as do Reset-Device, Set-Configuration, and Set-Interface.
This isn't mentioned in your document. There are "claim device" and
"release device" calls, but it doesn't say anywhere that only one
device can be claimed at a time. Nor is there a status code for "No
device claimed".
What happens when your protocol is used with a non-reliable transport?
Who is responsible for retransmissions/acknowledgements?
The reply to a submit call will be sent when the USB transfer is
complete. Suppose the transfer takes a long time. How does the client
tell the difference between a long-running transfer and an unreceived
submit? Do you essentially assume that all protocol transfers are
reliable?
There isn't any field in the submit reply to report the status of the
transfer (as opposed to the status of the submission). How do errors
like -EILSEQ get reported back to the client?
What about the extra flags that go with URB submissions?
URB_NO_INTERRUPT and URB_SHORT_NOT_OK might well be useful,
URB_ZERO_PACKET is certain to be needed, and even URB_ISO_ASAP might
come in handy.
It will not be possible to support all the features of Linux's USB
stack for these types of transfers (I'm referring to the way the
bandwidth isn't released if a new URB is submitted during the
completion callback).
Both types will require an additional "interval" field for submission,
and Isochronous will require "start_frame", "number_of_packets", and a
list of packet descriptors as well. It also will require a status and
length for each component packet in the reply.
In the unlink call, what is the "seqnum" field? Is it supposed to be
the call identifier of the corresponding submit call?
Alan Stern
--