]> git.baikalelectronics.ru Git - 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)
committerJon Mason <jdmason@kudzu.us>
Sat, 6 Jun 2020 00:02:08 +0000 (20:02 -0400)
commite0c44421153d78190a054688211a39e134c649c7
tree7c936e99bb7cca5da422ba3481d5049f89c1d698
parent6ceb5524ea3623c7501bb61eb414e7397266812a
NTB: Revert the change to use the NTB device dev for DMA allocations

Commit 514d48d78e36 ("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: e713b4116eea ("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>
drivers/ntb/core.c