lkml.org 
[lkml]   [2009]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH 1/2 v2] dmaengine: at_hdmac: new driver for the Atmel AHB DMA Controller
Nicolas Ferre wrote:
> This AHB DMA Controller (aka HDMA or DMAC on AT91 systems) is availlable on
> at91sam9rl chip. It will be used on other products in the future.
>
> This first release covers only the memory-to-memory tranfer type. This is the
> only tranfer type supported by this chip. On other products, it will be used
> also for peripheral DMA transfer (slave API support to come).
>
> I used dmatest client without problem in different configurations to test it.
>
> Full documentation for this controller can be found in the SAM9RL datasheet:
> http://www.atmel.com/dyn/products/product_card.asp?part_id=4243
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
[...]
> + /*
> + * We use dma_unmap_page() regardless of how the buffers were
> + * mapped before they were submitted...
> + */
> + if (!(txd->flags & DMA_COMPL_SKIP_DEST_UNMAP))
> + dma_unmap_page(chan2parent(&atchan->chan_common), desc->lli.daddr,
> + desc->len, DMA_FROM_DEVICE);
> + if (!(txd->flags & DMA_COMPL_SKIP_SRC_UNMAP))
> + dma_unmap_page(chan2parent(&atchan->chan_common), desc->lli.saddr,
> + desc->len, DMA_TO_DEVICE);

It is similar issue as the one fixed in 2.6.30 by 'ioatdma: fix "ioatdma frees DMA memory with wrong function"' patch:
commit 4f005dbe5584fe54c9f6d6d4f0acd3fb29be84da.
Note that this patch introduces dma control flags: DMA_COMPL_SRC_UNMAP_SINGLE and DMA_COMPL_DEST_UNMAP_SINGLE,
that could be used by the driver to choose proper unmapping.

Regards,
Maciej

\
 
 \ /
  Last update: 2009-07-03 15:01    [W:0.127 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site