Hello.
Ming Lei wrote:
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,
That's only in your patch. The original code was correct, except 'is_dma' part.
but the 2nd check
can handle requests with zlp or not, so it is needed indeed, isn't it?
No.
WBR, Sergei
--
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