Re: [Discussion] USB: musb-gadget: how to fix ZLP issue in musb_g_tx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/9/15 Felipe Balbi <balbi@xxxxxx>:
> Hi,
>
> On Wed, Sep 15, 2010 at 05:53:10AM -0500, Ming Lei wrote:
>>
>> 1),  why is the check for "is_dma" needed here?
>>
>>     if (is_dma || request->actual == request->length) {
>>          ....
>>     }
>
> if you programmed dma to request->length (and assuming it worked just
> fine) mode1 will only interrupt you when the entire request has been
> sent.

If so, once the dma interrupt comes, will request->actual be same
with request->length in musb_g_tx?  And if it is true, could we remove the
check for 'is_dma'?

>
>> 2), why is a zlp needed in the case below?
>>
>>     #ifdef CONFIG_USB_INVENTRA_DMA
>>                 || (is_dma && (!dma->desired_mode ||
>>                    (request->actual & (musb_ep->packet_sz - 1))))
>>    #endif
>
> in that case, it's not a zlp, it's short packet. Inventra will *NOT*
> transfer short packets, you need to set txpktrdy by hand to get it
> transfered.

I see now.

>
>> IMO, it is not difficult to give a good fix for the ZLP problem
>> if the two questions are clear.
>
> true, but some re-work needs to be done.

Thanks for your reply.


-- 
Lei Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux