2010/9/17 Sergei Shtylyov <sshtylyov@xxxxxxxxxx>: >>> I don't understand why we have to check this twice when only once would >>> suffice. > >> This check can handle both zero and non-zero request, so it is needed. > > It's needed above all the other checks, that's all. We don't need to check > it twice. The 1st check is if ((request->zero && request->length && (request->length % musb_ep->packet_sz == 0) && (request->actual == request->length) || ... ) { ... } The 2nd is if (request->actual == request->length) { musb_g_giveback(musb_ep, request, 0); ...... } The 1st check only can handle request with zlp, but the 2nd check can handle requests with zlp or not, so it is needed indeed, isn't it? -- Lei Ming -- 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