From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6F72DC001DB for ; Tue, 8 Aug 2023 16:03:31 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.96) (envelope-from ) id 1qTP9R-00017Q-0D; Tue, 08 Aug 2023 12:01:41 -0400 Received: from [82.165.184.165] (helo=mail.gnu-linux.rocks) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qTP9P-000177-09 for kernelnewbies@kernelnewbies.org; Tue, 08 Aug 2023 12:01:39 -0400 Received: from localhost.localdomain (ip5f5bfa1f.dynamic.kabel-deutschland.de [95.91.250.31]) by mail.gnu-linux.rocks (Postfix) with ESMTPSA id 46A773FE0E for ; Tue, 8 Aug 2023 16:01:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnu-linux.rocks; s=mail; t=1691510481; bh=nTNQWr7UWggETFS17Hh5+b3/BmovWpnRaf3mxU8GVFY=; h=From:To:Subject:Date:From; b=ht0ej4rilvO/vLdxDgB01GhISSXzZ7/WHNqMUj3RVM05s1vyP7glWm2G57EyS2VtC hzPR/WylDmjrC84K+0tBdjxhBbjsNvVHLijsQQ7phh9EBdWFURyzJwetFj6IuofCgO xWH7aa1TjRNHSYzvJggP1xilwnTne8hYQQVsEF8hhP46Xx4MBqUMeKJBMoWQC7PiwP gBKK/KN6UFyjTRTA6FQ/pyqOHolag/n9ceGhlYlTMx9r8QOQXWzBdxn+9PR/lvPEsu h0Xdqapd3vc7+FoK6E7ZPIH3VkLquHHkSS8nkNvA3z9caFwX000zR2tYNbfH8luEAb MfF5DyMG+zecw== 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 Message-ID: <20230808160115.10510-1-johannes@gnu-linux.rocks> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org 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