Re: at91_udc driver does not forward data received from host if size is less than ep buffer and size %64 == 0
Jeff Warren <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <1172177493.13840.25.camel@TinyLinux> |
On Thu, 2007-02-22 at 12:29, David Brownell wrote: > 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 I see that code in write_fifo so that my linux gadget can write a ZLP,but I dont see it in read_fifo where it receives a ZLP from the host. I think you are talking about if the Linux gadget is sending to the host. My problem is in the case of the Linux gadget receiving (960 bytes in my previous example) from the host(Windows). Regards, Jeff Warren ------------------------------------------------------------------------- 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