]> git.ipfire.org Git - thirdparty/linux.git/commit
NTB: ntb_transport: Use ntb_get_dma_dev() for DMA buffers
authorKoichiro Den <den@valinux.co.jp>
Fri, 6 Mar 2026 03:14:42 +0000 (12:14 +0900)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 27 Mar 2026 15:56:34 +0000 (10:56 -0500)
commit852b94ff92cbe26a0dbb15eed9474f5493767f3b
treecebfe9ac562b88b887978f7a3cf781de0214c2ae
parent362a4549f2acfb03390ddfcd91041e65a11a739f
NTB: ntb_transport: Use ntb_get_dma_dev() for DMA buffers

ntb_transport currently uses ndev->pdev->dev for coherent allocations
and frees.

Switch the coherent buffer allocation/free paths to use
ntb_get_dma_dev(), so ntb_transport can work with NTB implementations
where the NTB PCI function is not the right device to use for DMA
mappings.

Suggested-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Koichiro Den <den@valinux.co.jp>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260306031443.1911860-3-den@valinux.co.jp
drivers/ntb/ntb_transport.c