kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Getting a DMA channel on x86 for a PCIe transfer
@ 2023-08-08 16:01 johannes
  0 siblings, 0 replies; only message in thread
From: johannes @ 2023-08-08 16:01 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-08 16:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-08 16:01 Getting a DMA channel on x86 for a PCIe transfer johannes

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 NNTP newsgroup(s).