usb: cdns3: Use dma_pool_* api to alloc trb pool

Allocation of DMA coherent memory in atomic context using
dma_alloc_coherent() might fail on platforms with smaller
DMA region.

To fix it, dma_alloc_coherent() is replaced with dma_pool
API to allocate a smaller chunk of DMA coherent memory for
TRB rings.

Reported-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Sanket Parmar <sparmar@cadence.com>
Signed-off-by: Peter Chen <peter.chen@kernel.org>
This commit is contained in:
Sanket Parmar
2021-03-09 06:19:39 +01:00
committed by Peter Chen
parent 575dd7ece6
commit b9b1eae761
2 changed files with 20 additions and 23 deletions

View File

@@ -1298,6 +1298,7 @@ struct cdns3_device {
struct cdns3_usb_regs __iomem *regs;
struct dma_pool *eps_dma_pool;
struct usb_ctrlrequest *setup_buf;
dma_addr_t setup_dma;
void *zlp_buf;