Re: [OPW kernel] dma_set_coherent_mask

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

 



On Wed, 15 May 2013, Sarah Sharp wrote:

> > If you're using 64-bit DMA then you almost certainly do want to call
> > dma_set_coherent_mask().  On the plus side, it is guaranteed that if
> > dma_set_mask() succeeds with a particular mask value then
> > dma_set_coherent_mask() for the same mask value will also succeed.
> 
> So we need to call both dma_set_coherent_mask() and dma_set_mask()?  Or
> just dma_set_coherent_mask()?

It depends on what kind of DMA transfers you're going to do.  For
streaming transfers (the ones that use dma_map_single() or
dma_map_sg(), for example), you need to call dma_set_mask().  For
coherent transfers (the ones that use dma_alloc_coherent() or
dma_pool_create()), you need to call dma_set_coherent_mask().

If you want to do both kinds of transfers then you need to call both 
routines.

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