Tool/software:
When using SPI with DMA and spidev, ioctl never returns under certain conditions.
The easiest way to replicate this is to use a transfer size equal to the spidev max transfer size (4096 by default).
If you instead use a smaller transfer size in order to avoid this deadlock, it will just deadlock some time later (after some random number of transfers).
Steps to replicate (this example uses spi0):
1. Add DMA to SPI in device tree, if it isn't already:
dmas = <&main_pktdma 0xc300 0>, <&main_pktdma 0x4300 0>; dma-names = "tx0", "rx0";
2. Create an empty file of 4096 bytes to use as test transfer:
dd if=/dev/zero of=zeros bs=4096 count=1
3. Run spidev_test:
spidev_test -D /dev/spidev0.0 -i zeros -b 32
after this, you never get back to the shell, and it is stuck somewhere in the ioctl call. My guess would be some issue with the SPI/DMA/spidev driver interrupts, with timing or some race condition etc.