linux/drivers/ntb
Jiasen Lin 99a0605612 NTB: ntb_perf: Fix address err in perf_copy_chunk
peer->outbuf is a virtual address which is get by ioremap, it can not
be converted to a physical address by virt_to_page and page_to_phys.
This conversion will result in DMA error, because the destination address
which is converted by page_to_phys is invalid.

This patch save the MMIO address of NTB BARx in perf_setup_peer_mw,
and map the BAR space to DMA address after we assign the DMA channel.
Then fill the destination address of DMA descriptor with this DMA address
to guarantee that the address of memory write requests fall into
memory window of NBT BARx with IOMMU enabled and disabled.

Fixes: 5648e56d03 ("NTB: ntb_perf: Add full multi-port NTB API support")
Signed-off-by: Jiasen Lin <linjiasen@hygon.cn>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
2020-03-13 10:03:49 -04:00
..
hw NTB: Fix an error in get link status 2020-03-12 20:41:25 -04:00
test NTB: ntb_perf: Fix address err in perf_copy_chunk 2020-03-13 10:03:49 -04:00
core.c NTB: Rename ntb.c to support multiple source files in the module 2019-06-13 09:02:02 -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
msi.c NTB/msi: remove incorrect MODULE defines 2019-08-05 15:42:27 -04:00
ntb_transport.c NTB: ntb_transport: remove redundant assignment to rc 2019-09-23 17:20:40 -04:00