public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: mahdi hamzeh <mahdy.hamzeh@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: DMA
Date: Sat, 05 Feb 2011 09:41:44 -0800	[thread overview]
Message-ID: <4D4D8BD8.2050709@intel.com> (raw)
In-Reply-To: <AANLkTikSu2xo2VDLvvqoGWbAv8b_ZX9xvdjRGrUDb8Vt@mail.gmail.com>

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

      reply	other threads:[~2011-02-05 17:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTimW-PT801BUL8QQkhVpezX_VNw-1qLNRpeeoQFU@mail.gmail.com>
     [not found] ` <AANLkTinQWLOOSMS_8LcFkSmRT2K_CbQ+v2pH7FiNxqGo@mail.gmail.com>
     [not found]   ` <AANLkTimC=6TA8eF6jFYzm_3RzXkQo9BwCMexdjfPKtEC@mail.gmail.com>
     [not found]     ` <AANLkTinFJ54dCJPLANOmwejrBrb=vw0m-BLtq9a7ys5s@mail.gmail.com>
     [not found]       ` <AANLkTimiLJz-F3QMppVjh9ZaF8JbGeRawPgNme1dWjVJ@mail.gmail.com>
2011-01-25  7:15         ` DMA Paul Mundt
2011-02-04 21:01           ` DMA mahdi hamzeh
2011-02-05 17:41             ` Dan Williams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D4D8BD8.2050709@intel.com \
    --to=dan.j.williams@intel.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mahdy.hamzeh@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox