Hi, On Mon, Jun 24, 2013 at 05:53:25PM +0200, Sebastian Andrzej Siewior wrote: > On 06/24/2013 05:46 PM, Felipe Balbi wrote: > >> The DMA engines (intern or extern) do not merge transfers. Some > >> of them are clever enough to transfer a single 1024 as two 512 > >> requests. But two 256 bytes requests are not merged into one 512 > >> request. I believe the device side of dwc3 is able to do so if > >> marked properly but musb host side won't be able to do so. > > > > right, that's why we use a temporary buffer to copy data to and do > > the transfer. > > I remember this is done on dwc3's gadget RX side because the dma engine > expects a multiple of max packet size. You do this on musb as well? that's not related to SG, it's OUT transfers must be aligned on wMaxPacketSize, the size that is. Which means that even if you have an SG like so: SG[0] = 1023 SG[1] = 1025 the transfer size is still 2048 so that would work :-) For MUSB, take a look at musb_host.c and grep for memcpy() -- balbi
Attachment:
signature.asc
Description: Digital signature