Unexpected speed drop in pcie transfer speed and possible illegal access causes smmu errors

I previously posted on “Jetson Orin Developer Kit - unexpected drop in PCIe transfer speed”.
I checked my library. I checked the results. The values that I wrote to Orin’s RAM from my FPGA is correct values. It successfully did write them. I don’t think this problem is caused by library. Also, this library works well on different platforms that has Intel or other Arm processor. I couldn’t solve problem. What else can I do? At least, can I try to disable smmu? Because I read other posts that smmu causes some problems on PCIe transfers.

Hi,
Please follow the posts to disable smmu and re-write the driver:
pcie smmu issue - #4 by vidyas
pcie smmu issue - #6 by vidyas

I will try to rewrite my driver with functions that informs SMMU. Thanks

Hi,
I replaces these functions with suggested ones (for example: dma_map_sg). But still, I got some errors like:

nvidia_smmu_context_fault_bank: 9304 callbacks suppressed
tegra30_mc_handle_irq: 9419 callbacks suppressed
tegra-mc 2c00000.memory-controller: pcie5w: secure write @0x00000003ffffff00: VPR violation ((null))
arm-smmu 12000000.iommu: Unhandled context fault: fsr=0x402, iova=0xffcc3d40, fsynr=0x480013, cbfrsynra=0x1014, cb=15

Also, I noticed that if I try to send less than 819196 (2^14 * 50 - 4) bytes, I can write it without any errors. I suspect number “50” here. Do you have any other suggestions?