-
We may receive TRDY when the TX-FIFO is not entirely empty, which breaks the logic in rt_imx_uart_tx_chars(), as we may break early from the transmit loop when the TXFULL condition is detected, skipping decrement of ctx->out_npend although a byte was sent. Because of this, we may end up with ghost bytes in the output buffer which were actually sent to the UART, but still erroneously counted in ctx->out_npend. As a result, incorrect output can be observed later on as bytes from the software FIFO are unduly sent, or such FIFO may overflow indefinitely due to accumulated errors. Fix this by testing TXFULL before sending the next byte to the UART. At this chance, drop the count limit on the FIFO depth: testing TXFULL is sufficient and robust. Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
22d28f61