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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> @@ -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);
>  	}
> 
> -	if (req->mapped) {
> +	if (req->req.dma != 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 = DMA_ADDR_INVALID;
> -		req->mapped = 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 not
DMA_ADDR_INVALID either, in this case, the dma_sync_single_for_cpu is enough.


Peter


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux