From b9b1eae761eeae665824ca6ef7f91da4fc798ebb Mon Sep 17 00:00:00 2001 From: Sanket Parmar Date: Tue, 9 Mar 2021 06:19:39 +0100 Subject: 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 Signed-off-by: Sanket Parmar Signed-off-by: Peter Chen --- drivers/usb/cdns3/cdns3-gadget.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/usb/cdns3/cdns3-gadget.h') diff --git a/drivers/usb/cdns3/cdns3-gadget.h b/drivers/usb/cdns3/cdns3-gadget.h index 21fa461c518e..ecf9b91ccbb9 100644 --- a/drivers/usb/cdns3/cdns3-gadget.h +++ b/drivers/usb/cdns3/cdns3-gadget.h @@ -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; -- cgit v1.2.3