summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorDaniel Jedrychowski <avistel@gmail.com>2016-12-11 22:18:28 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-19 19:18:03 (GMT)
commiteca02f01be96d2ced5b2314dc4462c32e4ad0366 (patch)
tree93d6d0ff822a966fb52ba8dbcb72fd174c8bb9b2 /usr
parent86820a103f517f8d51a09ceacac30bde355f4e89 (diff)
downloadlinux-eca02f01be96d2ced5b2314dc4462c32e4ad0366.tar.xz
Clearing FIFOs in RS485 emulation mode causes subsequent transmits to break
commit 2bed8a8e70729f996af92042d3ad0f11870acc1f upstream. When in RS485 emulation mode, __do_stop_tx_rs485() calls serial8250_clear_fifos(). This not only clears the FIFOs, but also sets all bits in their control register (UART_FCR) to 0. One of the effects of this is the disabling of the FIFOs, which turns them into single-byte holding registers. The rest of the driver doesn't know this, which results in the lions share of characters passed into a write call to be dropped. (I can supply logic analyzer screenshots if necessary) This fix replaces the serial8250_clear_fifos() call to serial8250_clear_and_reinit_fifos() - this prevents the "dropped characters" issue from manifesting again while retaining the requirement of clearing the RX FIFO after transmission if the SER_RS485_RX_DURING_TX flag is disabled. Signed-off-by: Daniel Jedrychowski <avistel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions