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>
This commit is contained in:
Felipe Balbi 2011-08-27 15:10:09 +03:00
parent c611ccb48a
commit f198ead21b
1 changed files with 1 additions and 0 deletions

View File

@ -83,6 +83,7 @@ void dwc3_unmap_buffer_from_dma(struct dwc3_request *req)
req->request.length, req->direction req->request.length, req->direction
? DMA_TO_DEVICE : DMA_FROM_DEVICE); ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
req->mapped = 0; req->mapped = 0;
req->request.dma = DMA_ADDR_INVALID;
} else { } else {
dma_sync_single_for_cpu(dwc->dev, req->request.dma, dma_sync_single_for_cpu(dwc->dev, req->request.dma,
req->request.length, req->direction req->request.length, req->direction