Re: [PATCH v2 2/2] usb: gadget: Add xilinx axi usb2 device support
From: Felipe Balbi
Date: Wed Jul 02 2014 - 12:46:45 EST
Hi,
On Sun, May 25, 2014 at 11:10:30PM +0530, sundeep subbaraya wrote:
> Hi Felipe,
>
> Please take a look at below about how this IP works:
>
> IN:
> req.buf ---> DMA (transfers from ddr to IP buffer, raise DMA
> done interrupt and set Buffer ready to transfer data to Host)---->Host
> PC
> buffer sent interrupt
>
> OUT:
> Host PC--->buffer ready interrupt--->DMA (transfer from IP buffer
> to DDR,DMA done interrupt, set Buffer ready to receive next data from
> Host)-->req.buf
>
> I written logic to call completion in DMA done handler because it
> works for both IN and OUT eps. But I see significant performance
> degradation (by copying a file to mass storage gadget). DMA can handle
> unaligned address too but it has ep max limit (say 512 for bulk).
> Hence it is SW job to split packets and to drive DMA till req.length
> completes. I feel polling for a while is faster than switching between
> interrupt handler back and forth rapidly. Moreover, DMA may or may not
> be present in IP based on user configuration at design time.
>
> I fixed all other comments expect this one if you do not agree for
> polling then I may have to create threads and do this stuff. What do
> you suggest?
Can you resend your driver so we can review again everything you have
fixed ? I guess you have no other way... polling it is.
cheers
--
balbi
Attachment:
signature.asc
Description: Digital signature