Thread (6 messages) flat view 6 messages, 4 authors, 2012-09-06

RE: [PATCH] usb: gadget: fsl_udc_core: remove mapped flag

From: Chen Peter-B29397 <hidden>
Date: 2012-09-05 02:17:16

=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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help