Hello.
Ming Lei wrote:
We have discussed the patch for some time already, why do you say
original code again?
I was discussing the approach, not your patch.
If we talk in code or patch, the discuss may be more efficient, right?
I wasn't approving of your patch's approach, so I appealed to the original
code which as I thought needed to be only slightly tweaked...
For the patch, it is more clear than original code in logic:
- handle zlp or short packet first if one of two conditions is true
- complete the request if data transfer is over
Both these should be done when (request->actual == request->length),
that's my point.
OK, If we are sure that request->actual is equal to request->length
for the short packet case, doing the check once is enough.
Hey, wait a minute! I'm now seeing that I was wrong, and there's one case we
did not consider: we not only need to set TxPktRdy for the short packet but also
for *each* packet in DMA mode 0. There's (!dma->desired_mode || (request->actual
& (musb_ep->packet_sz - 1))) check, where I wrongly thought || to be &&. That
way the 'is_dma' check above that makes sense indeed...
Felipe, the revised patch will be sending out later to you...
Felipe, please drop this patch in favor of the previous implementation.
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