Skip to content

Draft: tty:serial:imx: fix uart latency for rs485 on mx6ull

This is a "kuk" version of a fix for https://secogroup.atlassian.net/browse/YT-136 Nallino: RS485 turn around time problem.

MR for "guf" kernel: linux-guf!312 (closed)

Our current understanding is as follows:

  • from time to time, UART transmission fails to complete in time (delay is up to 3ms). And when other side starts to reply to our transmission during this delay, this message is not received because signals are still pulled up/down;
  • for some reason, an interrupt is not generated from time to time after all bytes from internal buffers are transmitted;
  • we believe that this is because of preemption of stop_tx() routine by other processes in kernel;
  • we checked 5.x and 6.x kernels and behavior and UART driver design is the same;
  • but we found that the driver for 4.x kernel is of different design focused on IRQ and not on DMA. We also noticed that TX routine is streamlined, which should minimize the number of switching of context during execution.

As a result, we just simplified the TX routine by analogy with 4.x kernel.

After applying this workaround, we launched rs485echo for 15 minutes on Nallino and no failures have been reported.

Edited by Mikhail Vanyulin

Merge request reports

Loading