]> Git Repo - linux.git/commit
serial: omap: fix rs485 half-duplex filtering
authorDario Binacchi <[email protected]>
Sun, 18 Apr 2021 09:47:05 +0000 (11:47 +0200)
committerGreg Kroah-Hartman <[email protected]>
Thu, 22 Apr 2021 10:07:07 +0000 (12:07 +0200)
commite2a5e8448e7393e96ccde346c68764b40a52cc10
tree464cf7ecf4c8e500712d01464f556e51feeb9920
parent45f6b6db53c80787b79044629b062dfcf2da71ec
serial: omap: fix rs485 half-duplex filtering

Data received during half-duplex transmission must be filtered.
If the target device responds quickly, emptying the FIFO at the end of
the transmission can erase not only the echo characters but also part of
the response message.
By keeping the receive interrupt enabled even during transmission, it
allows you to filter each echo character and only in a number equal to
those transmitted.
The issue was generated by a target device that started responding
240us later having received a request in communication at 115200bps.
Sometimes, some messages received by the target were missing some of the
first bytes.

Fixes: 3a13884abea0 ("tty/serial: omap: empty the RX FIFO at the end of half-duplex TX")
Signed-off-by: Dario Binacchi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/tty/serial/omap-serial.c
This page took 0.044724 seconds and 4 git commands to generate.