lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 05 Feb 2011 09:41:44 -0800
From:	Dan Williams <dan.j.williams@...el.com>
To:	mahdi hamzeh <mahdy.hamzeh@...il.com>
CC:	Paul Mundt <lethal@...ux-sh.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ