OSDN Git Service

usb: cdns3: Use dma_pool_* api to alloc trb pool
authorSanket Parmar <sparmar@cadence.com>
Tue, 9 Mar 2021 05:19:39 +0000 (06:19 +0100)
committerPeter Chen <peter.chen@kernel.org>
Mon, 12 Apr 2021 12:19:22 +0000 (20:19 +0800)
commitb9b1eae761eeae665824ca6ef7f91da4fc798ebb
treee234444962cfcefdaabd241bc44ee682e45c00a3
parent575dd7ece61fa93270cb5749708b140a9c9cf947
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>
drivers/usb/cdns3/cdns3-gadget.c
drivers/usb/cdns3/cdns3-gadget.h