=20
quoted hunk ↗ jump to hunk
@@ -195,14 +195,13 @@ static void done(struct fsl_ep *ep, struct fsl_req
*req, int status)
dma_pool_free(udc->td_pool, curr_td, curr_td->td_dma);
}
=20
- if (req->mapped) {
+ if (req->req.dma !=3D DMA_ADDR_INVALID) {
dma_unmap_single(ep->udc->gadget.dev.parent,
req->req.dma, req->req.length,
ep_is_in(ep)
? DMA_TO_DEVICE
: DMA_FROM_DEVICE);
req->req.dma =3D DMA_ADDR_INVALID;
- req->mapped =3D 0;
} else
dma_sync_single_for_cpu(ep->udc->gadget.dev.parent,
If the class driver has already mapped this address, the req->req.dma is no=
t
DMA_ADDR_INVALID either, in this case, the dma_sync_single_for_cpu is enoug=
h.
Peter