I have an embedded Linux system built using Yocto. Recently I upgraded from Dunfell (kernel 5.4) to Kirkstone (kernel 5.15) and I started having problems with the serial port. Large chunks of bytes will sometimes be dropped while transmitting. Sometimes I can send 1M of data with no dropped bytes, other times I send that amount with only 300 bytes transmitting.
I had a previous problem with this system where I had a similar symptoms. A few bytes would be dropped on TX, and I had to significantly lower the baud rate to achieve stability. Then the problem ended up being that I wasn't running the imx_sdma module. Once I included that, everything worked normal at higher baud rates.
So when I had this problem, the first thing I checked as that that module was loaded, which it is. I also found that dropping the baud rate isn't having a noticeable impact on the dropped bytes. So it seems different.
I can rule out hardware issues as it wasn't happening before the upgrade and it's happening on other systems.
There isn't a heavy processing load during these transfers. The processor is currently sitting at 0% utilization.
I should note there is no hardware or software flow control on this system. It's actually a TX only path. Some data loss or corruption might be expected in such a case, but not like this, and it was working fine before.
Does anyone have any ideas of what I should be looking at for a cause or solution?
Edit: One somewhat strange thing on the receive side, the device (/dev/ttymxc1) is non-blocking. I can stream bytes to it, but if I do a cat /dev/ttymxc1 or dd if=/dev/ttymxc1, it returns immediately with no data, even if a lot of bytes should be coming in on that port. That makes me think there might be some receive issue.
dd
ing to the device file? And no hints in the system log about FIFO overrun? – Philippos Sep 06 '23 at 10:41