On Fri, Jul 19, 2013 at 1:36 PM, Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote: > On 07/19/2013 09:59 AM, Rajaram R wrote: >>> Okay. musb offloads the actual transfer to the DMA engine it is using. >>> Once it does so, it relies on whatever comes back from dma engine >>> regarding transfer complete, transferred size etc. >> >> AFAIK ux500 musb dma code handles data which is multiple of max packet >> size in DMA. 1 byte should be in PIO mode. Which version of kernel you >> are using ? > > I am looking at v3.11-rc1 right now and I don't have the HW. > > As I said: The URB scheduled for receive is 256 bytes in size, max > packet size is 64. So DMA should be chosen, right? > The UART on other side sends just one byte so the DMA receives just one > byte regardless what has been requested. > My question is how musb gets notified of this one byte. It might happen > someplace but I don't see it. We program the DMA only when we receive RX interrupt and when the length of data is known. When you submit URB for RX the flow would be something like musb_start_urb==>musb_ep_program, Note here we do not program the DMA. DMA is programmed musb_host_rx using "channel_program" callback. Note here we pass the length of data received. Now in ux500_dma file 'ux500_dma_is_compatible' fails the dma operation and the driver switches to FIFO mode in the same function (musb_host_rx). Cheers > > Sebastian -- 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