RE: using cacheable buffer for descriptor

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

 



On Fri, 3 Jul 2009, Yang Fei-AFY095 wrote:

> >> 1. I see dma_cache_maint is called by usb_submit_urb before starting 
> >> data transfer,
> 
> >It is?  Where?
> 
> In drivers/usb/core/hcd.c, usb_hcd_submit_urb -> map_urb_for_dma ->
> dma_map_single -> dma_cache_maint.
> dma_map_single is defined in arch/arm/include/asm/dma-mapping.h

I would have said that dma_map_single, not usb_submit_urb, calls
dma_cache_maint.

> This is called when we submit urb, for OUT data, I think it's sufficient
> for cache consistency. But what I need to know is how we guarantee the
> cache consistency for IN data, because the DMA is going to update the
> physical memory when receiving data from device, something has to be
> done upon completion of the urb.

Obviously you looked at map_urb_for_dma.  Have you also looked at 
unmap_urb_for_dma?

Alan Stern

--
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