Kernel Newbies archive mirror
 help / color / mirror / Atom feed
From: johannes@gnu-linux.rocks
To: kernelnewbies@kernelnewbies.org
Subject: Getting a DMA channel on x86 for a PCIe transfer
Date: Tue,  8 Aug 2023 18:01:15 +0200	[thread overview]
Message-ID: <20230808160115.10510-1-johannes@gnu-linux.rocks> (raw)

Hi,
I want to transfer data from the RAM to a BAR with memory space of a PCIe Endpoint over a DMA on a x86 System.

But currently I am failing to get a channel of a DMA controller.

In the probe function, I tried to requst a DMA channel with:

dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE | DMA_PRIVATE, mask);
chan = dma_request_channel(mask, NULL, NULL);

and also with:

chan =  dma_request_chan(&pdev->dev, pci_name(pdev));

But in both cases IS_ERR_OR_NULL(chn) is true, so I am not getting a valid DMA channel.

What am I doing wrong? How to get a DMA channel on a x86 system?

Best regards,
Johannes

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

                 reply	other threads:[~2023-08-08 16:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230808160115.10510-1-johannes@gnu-linux.rocks \
    --to=johannes@gnu-linux.rocks \
    --cc=kernelnewbies@kernelnewbies.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).