summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2011-08-27 14:10:09 +0200
committerFelipe Balbi <balbi@ti.com>2011-09-09 12:02:01 +0200
commitf198ead21bcb7b03d7bb2cba7ba0f5ad615a3862 (patch)
tree79e58d31e79008d7295a642d3a634c5fb001cc03
parentusb: dwc3: ep0: fix 'transfered' typo (diff)
downloadlinux-f198ead21bcb7b03d7bb2cba7ba0f5ad615a3862.tar.xz
linux-f198ead21bcb7b03d7bb2cba7ba0f5ad615a3862.zip
usb: dwc3: gadget: set request dma to invalid when unmapping
if we don't set DMA address to invalid when unmapping, we might fall in a situation where request buffer can't be mapped to DMA again. Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/dwc3/gadget.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 2ee6714bda4b..4d232c3646cc 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -83,6 +83,7 @@ void dwc3_unmap_buffer_from_dma(struct dwc3_request *req)
req->request.length, req->direction
? DMA_TO_DEVICE : DMA_FROM_DEVICE);
req->mapped = 0;
+ req->request.dma = DMA_ADDR_INVALID;
} else {
dma_sync_single_for_cpu(dwc->dev, req->request.dma,
req->request.length, req->direction