summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/gadget.c
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2015-02-23 13:10:15 (GMT)
committerMarek Vasut <marex@denx.de>2015-04-14 03:48:10 (GMT)
commit8d488f3e16f1a7f2b6b3d1f8420b0871123e56f8 (patch)
treefd4e89f8c447d958809113cc7dfbc5cb461f4268 /drivers/usb/dwc3/gadget.c
parent1f78f8fedab10f7b30559d6db9b142be5b6daf75 (diff)
downloadu-boot-fsl-qoriq-8d488f3e16f1a7f2b6b3d1f8420b0871123e56f8.tar.xz
usb: dwc3: Add chained TRB support for ep0
dwc3 can do only max packet aligned transfers. So in case request length is not max packet aligned and is bigger than DWC3_EP0_BOUNCE_SIZE two chained TRBs is required to handle the transfer. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r--drivers/usb/dwc3/gadget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 8560b88..c8b7499 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2580,7 +2580,7 @@ int dwc3_gadget_init(struct dwc3 *dwc)
goto err0;
}
- dwc->ep0_trb = dma_alloc_coherent(sizeof(*dwc->ep0_trb),
+ dwc->ep0_trb = dma_alloc_coherent(sizeof(*dwc->ep0_trb) * 2,
(unsigned long *)&dwc->ep0_trb_addr);
if (!dwc->ep0_trb) {
dev_err(dwc->dev, "failed to allocate ep0 trb\n");