From: Felipe Balbi Date: Sat, 27 Aug 2011 12:10:09 +0000 (+0300) Subject: usb: dwc3: gadget: set request dma to invalid when unmapping X-Git-Tag: firefly_0821_release~3680^2~4327^2~148^2~39 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f198ead21bcb7b03d7bb2cba7ba0f5ad615a3862;p=firefly-linux-kernel-4.4.55.git 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 --- 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