Hi Simon,
If I understand it correctly, you are not using the uart flow control. And the uart baud rate here is very slow -- 9600bps, that is to say, it takes more than 1ms to receive a byte(10bits/9600*1000=1.0416ms).
While the sender seems to be sending more than a hundred data every 10ms, this will definitely cause the receiver to overflow, because even if we don't consider the time required for sw processing, the receiver can only process less than 10 bytes of data every 10ms.
So seems to me this is not an issue, it is an expected behavior, too much data will cause the tty buffer overflow, tty core layer will discard the data that cannot be processed. The reason why we need flow control is to avoid such case.
It should no error in imx_uart_dma_rx_callback(), a simple way to prove that, you can try to disable uart dma mode as the following code, try to use cpu mode uart, I believe you can also observe the same behavior here.
diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
index 1c5b0b339c16..803976d693b7 100755
--- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
@@ -958,8 +958,6 @@
clocks = <&clk IMX8MM_CLK_UART3_ROOT>,
<&clk IMX8MM_CLK_UART3_ROOT>;
clock-names = "ipg", "per";
- dmas = <&sdma1 26 4 0>, <&sdma1 27 4 0>;
- dma-names = "rx", "tx";
status = "disabled";
};
Best Reagrds
Sherry