Re: at91_udc driver does not forward data received from host if size is less than ep buffer and size %64 == 0

David Brownell <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Thursday 22 February 2007 11:07 am, Jeff Warren wrote:

> 	So I have changed my host program to check and see if the data size
> being sent to the gadget is divisible by 64 (size % 64 == 0).  If it is,
> then I add a small chunk so that the driver will handle it correctly and
> the data will be processed upon transfer completion.
> 	I hate this fix, but it is the only one I can think of, anybody have a
> better way of fixing this issue?  I looked at the driver and could not
> come up with an elegant solution to this.

On Linux, at least, you would set a flag in the URB to say that it must
terminated by a zero-length packet.  Your driver wouldn't have to check
anything, the underlying controller driver would ensure the transfer is
terminated by a "short" packet (in this case, a zero length packet).

- Dave

-------------------------------------------------------------------------
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
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.