[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210309092804.GA76839@infradead.org>
Date: Tue, 9 Mar 2021 09:28:04 +0000
From: Christoph Hellwig <hch@...radead.org>
To: Sanket Parmar <sparmar@...ence.com>
Cc: peter.chen@...nel.org, pawell@...ence.com, a-govindraju@...com,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
kurahul@...ence.com, gregkh@...uxfoundation.org, kishon@...com
Subject: Re: [PATCH 2/2] usb: cdns3: Optimize DMA request buffer allocation
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 buffer of dynamic length.
dma_alloc_noncoherent is the proper API instead of using kmalloc, which
can lead to unaddressable memory that might require bounce buffering.
Powered by blists - more mailing lists