Getting a DMA channel on x86 for a PCIe transfer

johannes at johannes at
Tue Aug 8 12:01:15 EDT 2023

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_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,

More information about the Kernelnewbies mailing list