SPI error: I/O Error in DMA RX

In our system we are using ECSPI to transfer a big portion of data to the device. One chunk of data is sended in this way:

spi_xfer.tx_buf = ptr;

spi_xfer.bits_per_word = 32;

spi_xfer.len = 0x10000;

spi_message_init(&msg);

spi_message_add_tail(&spi_xfer, &msg);

status = spi_sync(spidev, &msg);

Everything was fine, until we have changed the kernel version from 3.14.38 to 4.9.88 (from Boundary Devices). Now the kernel shows an error after transmiting first chunk of data (the following chunks are transmiting just fine):

spi_master spi4: I/O Error in DMA RX

spi4.0: SPI transfer failed: -110

spi_master spi4: failed to transfer one message from queue

It looks like after transmiting the first chunk, SDMA is still waiting for data, so it doesn't generate an interrupt. But we don't understand why, and why it works in older kernel.