From: Anand Gadiyar <gadiyar@xxxxxx> Currently, with Inventra DMA, we use Mode 0 if transfer size is less than or equal to the endpoint's maxpacket size. This requires that we explicitly set TxPktRdy for that transfer. However the musb_g_rx code will not set TxPktRdy twice if the last transfer is exactly equal to maxpacket, even if request->zero is set. Using Mode 1 will solve this; a better fix might be in musb_g_rx(). Without this change, musb will not correctly send out a ZLP if the last transfer is the maxpacket size and request->zero is set. Signed-off-by: Anand Gadiyar <gadiyar@xxxxxx> Signed-off-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx> --- drivers/usb/musb/musb_gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -310,7 +310,7 @@ static void txstate(struct musb *musb, s /* setup DMA, then program endpoint CSR */ request_size = min(request->length, musb_ep->dma->max_len); - if (request_size <= musb_ep->packet_sz) + if (request_size < musb_ep->packet_sz) musb_ep->dma->desired_mode = 0; else musb_ep->dma->desired_mode = 1; -- 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