lkml.org 
[lkml]   [2011]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: DMA
On 02/04/2011 01:01 PM, mahdi hamzeh wrote:
> Paul,
>
> Thanks for your help. You were right. There was a version mismatch
> between my header files and I got it fixed. I could compile all
> related dma modules including async modules. However, I cannot use dma
> engine because I receive following error when I run my code,
> "__dma_request_channel: fail ((null))". Even I tried
> Documentation/crypto/async-tx-api.txt but it turns out that when I
> issue a transaction such that "async_memcpy" and I wait for
> transaction to be completed by "wait_for_completion", it is never
> completed. Is this problem related to my machine or my code?
>
> Here is my code:
>
> struct async_submit_ctl submit;
> struct completion cmp;
> init_completion(&cmp);
> init_async_submit(&submit, flag, NULL, NULL,&cmp, addr_conv);
^^^^
Hmm... what's wrong with this parameter? ;-)

> dma_cap_mask_t myMask;
> dma_cap_zero(myMask);
> dma_cap_set(DMA_PRIVATE, myMask); //I tried different combination of
> flags like DMA_MEMCPY ,....
> myDMAChannel = dma_request_channel(myMask, NULL, filter_param);
>
> myDMAChannel is always NULL.

This is a bit more subtle. Depending on the driver and the kernel
configuration all channels may already be consumed for "public" usage
(NET_DMA and/or ASYNC_TX_DMA).

One way to sanity check your system is to turn off CONFIG_NET_DMA and
CONFIG_ASYNC_TX_DMA and turn on CONFIG_DMATEST, load dmatest.ko and it
should give a clue about whether dma is operational on your platform.

--
Dan


\
 
 \ /
  Last update: 2011-02-05 18:45    [W:0.047 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site