Hi Sergei, On Fri, 23 Mar 2012 15:59:52 +0400 Sergei Shtylyov <sshtylyov@xxxxxxxxxx> wrote: > > When sent data lenght is a multiple size of maximum packet size (MPS > > = 64B for EP0), then sent a ZLP pbacket to indicate end of the > > transfer to a USB host. > > > The above condition only applies, when requested data from host is > > NOT equal to multiplied value of MPS (e.g. host requested 4096B > > from device). > > I couldn't parse that. Of course 4096 is dividisble by 64. Adn > you seem to be contradiction the first paragraph. If you have problem to "parse" that, then I think, that I shall write a better description :-). I will try to explain it in another way: We are talking about IN requests. 1. Host requests e.g. 256B (which is a multiple of MPS = 64B). Then NO ZLP shall be sent, since host expects exact number of bytes. 2. Host requested 4096B, but our data for sending is 256B. In this situation ZLP shall be send to tell host that no more data is available and it shall not wait for more data. This prevents host from hanging. I hope that this description has shed more light. > > + && hs_req->req.length == hs_req->req.actual > > + && !(hs_req->req.length % hs_ep->ep.maxpacket)) { > > Ususally the operator is left on the prevsious line... I can change the order - no problem :-) Thanks for review. -- Best regards, Lukasz Majewski Samsung Poland R&D Center Platform Group -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html