How to change spi_ioc_transfer max length

I tryed to connect the colibri to a microcontroller via spi. Messages over 4096 bit length are not successfully transfered. Below this limit all works fine. How can I change the set “max value” to 8192 or more? I am programming with c.

struct spi_ioc_transfer tr =
{

	.tx_buf = (unsigned long)tx,
	.rx_buf = (unsigned long)rx,
	.len = ARRAY_SIZE(tx), // limited to 4096 bytes!
	.delay_usecs = delay,
	.speed_hz = speed,
	.bits_per_word = bits,
};

...

retVal = ioctl(fd_SPI, SPI_IOC_MESSAGE(1), &tr);

4096 is the default buffer size used in spidev kernel module. You can change this using the spidev.bufsiz kernel module parameter.

See https://www.toradex.com/community/questions/20879/maximum-transfer-size-4096-bytes-with-spidev-drive.html