]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
NTB: Revert the change to use the NTB device dev for DMA allocations
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 9 Jan 2019 19:22:27 +0000 (12:22 -0700)
committerKhalid Elmously <khalid.elmously@canonical.com>
Sat, 8 Aug 2020 05:53:12 +0000 (01:53 -0400)
commit02808cba0213c30c5cd99505545d28f8077da88e
tree698b09b5959807ad9d8a4abfa015838adf2c714d
parentb282e8f0703c60cb09617d50849945cd14b21cbc
NTB: Revert the change to use the NTB device dev for DMA allocations

BugLink: https://bugs.launchpad.net/bugs/1885322
[ Upstream commit 40da7d9a93c8941737ef4a1208d32c13ce017fe1 ]

Commit 417cf39cfea9 ("NTB: Set dma mask and dma coherent mask to NTB
devices") started using the NTB device for DMA allocations which was
turns out was wrong. If the IOMMU is enabled, such alloctanions will
always fail with messages such as:

  DMAR: Allocating domain for 0000:02:00.1 failed

This is because the IOMMU has not setup the device for such use.

Change the tools back to using the PCI device for allocations seeing
it doesn't make sense to add an IOMMU group for the non-physical NTB
device. Also remove the code that sets the DMA mask as it no longer
makes sense to do this.

Fixes: 7f46c8b3a552 ("NTB: ntb_tool: Add full multi-port NTB API support")
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Tested-by: Alexander Fomichev <fomichev.ru@gmail.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/ntb/core.c