Re: [PATCH 2/2] usb: cdns3: Optimize DMA request buffer allocation

2021-03-15 Thread Peter Chen
On 21-03-15 15:51:04, Sanket Parmar wrote: > > > + > > > priv_req->flags |= REQUEST_UNALIGNED; > > > trace_cdns3_prepare_aligned_request(priv_req); > > > > > > @@ -3088,11 +3113,11 @@ static void cdns3_gadget_exit(struct cdns > > *cdns) > > > struct cdns3_aligned_buf *buf; > > > > >

RE: [PATCH 2/2] usb: cdns3: Optimize DMA request buffer allocation

2021-03-15 Thread Sanket Parmar
> > On 21-03-09 06:19:40, Sanket Parmar wrote: > > dma_alloc_coherent() might fail on the platform with a small DMA region. > > > > To avoid such failure in cdns3_prepare_aligned_request_buf(), > > dma_alloc_coherent() is replaced with kmalloc and dma_map API to > > allocate aligned request

Re: [PATCH 2/2] usb: cdns3: Optimize DMA request buffer allocation

2021-03-13 Thread Peter Chen
On 21-03-09 06:19:40, Sanket Parmar wrote: > dma_alloc_coherent() might fail on the platform with a small DMA region. > > To avoid such failure in cdns3_prepare_aligned_request_buf(), > dma_alloc_coherent() is replaced with kmalloc and dma_map API to > allocate aligned request buffer of dynamic

RE: [PATCH 2/2] usb: cdns3: Optimize DMA request buffer allocation

2021-03-09 Thread Sanket Parmar
> On Tue, Mar 09, 2021 at 10:18:43AM +, Sanket Parmar wrote: > > > On Tue, Mar 09, 2021 at 06:19:40AM +0100, Sanket Parmar wrote: > > > > dma_alloc_coherent() might fail on the platform with a small DMA > region. > > > > > > > > To avoid such failure in cdns3_prepare_aligned_request_buf(), > >

Re: [PATCH 2/2] usb: cdns3: Optimize DMA request buffer allocation

2021-03-09 Thread Christoph Hellwig
On Tue, Mar 09, 2021 at 10:18:43AM +, Sanket Parmar wrote: > > On Tue, Mar 09, 2021 at 06:19:40AM +0100, Sanket Parmar wrote: > > > dma_alloc_coherent() might fail on the platform with a small DMA region. > > > > > > To avoid such failure in cdns3_prepare_aligned_request_buf(), > > >

RE: [PATCH 2/2] usb: cdns3: Optimize DMA request buffer allocation

2021-03-09 Thread Sanket Parmar
> On Tue, Mar 09, 2021 at 06:19:40AM +0100, Sanket Parmar wrote: > > dma_alloc_coherent() might fail on the platform with a small DMA region. > > > > To avoid such failure in cdns3_prepare_aligned_request_buf(), > > dma_alloc_coherent() is replaced with kmalloc and dma_map API to > > allocate

Re: [PATCH 2/2] usb: cdns3: Optimize DMA request buffer allocation

2021-03-09 Thread Christoph Hellwig
On Tue, Mar 09, 2021 at 06:19:40AM +0100, Sanket Parmar wrote: > dma_alloc_coherent() might fail on the platform with a small DMA region. > > To avoid such failure in cdns3_prepare_aligned_request_buf(), > dma_alloc_coherent() is replaced with kmalloc and dma_map API to > allocate aligned request

[PATCH 2/2] usb: cdns3: Optimize DMA request buffer allocation

2021-03-08 Thread Sanket Parmar
dma_alloc_coherent() might fail on the platform with a small DMA region. To avoid such failure in cdns3_prepare_aligned_request_buf(), dma_alloc_coherent() is replaced with kmalloc and dma_map API to allocate aligned request buffer of dynamic length. Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence