ezdma icon indicating copy to clipboard operation
ezdma copied to clipboard

dma_map_sg fails

Open jotorious opened this issue 6 years ago • 3 comments

I'm running your driver on an xilinx embedded linux (built w/ petalinux 2017.3) and a Zynq Ultrascale device, and when I run the speed test /loopback test, dma_map_sg returns 0 and errors out. My HW is an AXI-DMA looped back through an AXI-4 Stream Data Fifo.

The AXI DMA hw (vivado gui) properties are: Width of Buffer Length Register: 14 bits Address Width: 32 bits Max burst size: 128 Stream Data width: 32 Allow unalligned transfers is unchecked. Enable Scatter Gather Engine is checked.

I tried changing the packet size to a smaller value such that there is only a single entry in the SG table, but I get the same error. I am currently trying see about comparing addresses between the userspace test program and the driver/module.

jotorious avatar Jul 30 '18 19:07 jotorious

I've subsequently tried changing almost all of these parameters, to no avail. In investigating the address width, I tried to use the dma_get_required_mask and dma_set_mask functions, dma_get_required_mask returns 0x0000 000F FFFF FFFF. dma_set_mask fails for every value from 64, downto 1.

I have also run xilinx axidmatest driver against my HW design and it appears to succeed. It runs a bit differently; it appears to not use the dmaengine functions.

jotorious avatar Aug 01 '18 18:08 jotorious

Dont know what the issue is for the arm64 architecture.

noelpedro avatar Mar 30 '20 05:03 noelpedro

I have exactly the same problem with Zynq7020 on kernel 6.1.5-xilinx

strijar avatar Apr 30 '24 17:04 strijar