Uart rs232 problem imx6 dual light

I am using a imx6 dual light sbc board. At first I builed a 3.14 linux kernel with Yocto 2.0. I have a Qt app.
In the app I use uart module and I am using QSerialPort class. With the 3.14 linux kernel version this app works fine.
Now I updeted linux version to a 4.9 linux version with Yocto 2.4. With the new linux version uart module works incorrectly, the read function is slower that 3.14 version.
The device that is connected to uart transmites every time.

this is the constructure code where I configure uart class.

serial = new QSerialPort;
senderCounter = 0;
/*serial port Configuration*/

if(serial->open(QIODevice::ReadWrite) == true){

Someone who can help me o who had the same problem.
Thank you

I have been doing some tests. If I send data from the pc to the board the qt app receives it well. I mean, if I send for example from the linux terminal “0011” the app receives it well.
The device that I need to use sends data constantly with a certain frequency, in this case it is like receiving a certain amount of data that it stores in a buffer, for example it receives 500 data and after a certain time it receives another 500 data session.
The problem seems to be in the configuration of the kernel uart. I was reading but I can not find an answer yet.
Any idea or answer that can help me.

Reading imx6 linux manual I read that uart has dma and sdma buffer and the uart will be interrup when sdma buffer fills, The size of this buffer is 512, I dont know if It’s possible to decrease It. I put rx dma in zero in the dts file and now It works fine.