linux-stable/drivers/ntb/test
Sanjay R Mehta 98f4e14026 ntb_perf: pass correct struct device to dma_alloc_coherent
Currently, ntb->dev is passed to dma_alloc_coherent
and dma_free_coherent calls. The returned dma_addr_t
is the CPU physical address. This works fine as long
as IOMMU is disabled. But when IOMMU is enabled, we
need to make sure that IOVA is returned for dma_addr_t.
So the correct way to achieve this is by changing the
first parameter of dma_alloc_coherent() as ntb->pdev->dev
instead.

Fixes: 5648e56d03 ("NTB: ntb_perf: Add full multi-port NTB API support")
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com>
Signed-off-by: Arindam Nath <arindam.nath@amd.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
2020-06-05 20:02:08 -04:00
..
Kconfig New feature to add support for NTB virtual MSI interrupts, the ability 2019-07-21 09:46:59 -07:00
Makefile New feature to add support for NTB virtual MSI interrupts, the ability 2019-07-21 09:46:59 -07:00
ntb_msi_test.c NTB: Introduce NTB MSI Test Client 2019-06-13 09:02:51 -04:00
ntb_perf.c ntb_perf: pass correct struct device to dma_alloc_coherent 2020-06-05 20:02:08 -04:00
ntb_pingpong.c ntb: ntb_pingpong: no need to check the return value of debugfs calls 2019-10-16 06:07:22 -07:00
ntb_tool.c ntb_tool: Fix printk format 2020-03-13 10:03:49 -04:00