提交 3a13884a 编写于 作者: D Dimitris Lampridis 提交者: Greg Kroah-Hartman

tty/serial: omap: empty the RX FIFO at the end of half-duplex TX

Provided that the SER_RS485_RX_DURING_TX flag is not set, empty the
RX FIFO to prevent reading back the transmitted data.
Signed-off-by: NDimitris Lampridis <dlampridis@logikonlabs.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 cab53dc9
...@@ -342,6 +342,12 @@ static void serial_omap_stop_tx(struct uart_port *port) ...@@ -342,6 +342,12 @@ static void serial_omap_stop_tx(struct uart_port *port)
if ((up->rs485.flags & SER_RS485_ENABLED) && if ((up->rs485.flags & SER_RS485_ENABLED) &&
!(up->rs485.flags & SER_RS485_RX_DURING_TX)) { !(up->rs485.flags & SER_RS485_RX_DURING_TX)) {
/*
* Empty the RX FIFO, we are not interested in anything
* received during the half-duplex transmission.
*/
serial_out(up, UART_FCR, up->fcr | UART_FCR_CLEAR_RCVR);
/* Re-enable RX interrupts */
up->ier |= UART_IER_RLSI | UART_IER_RDI; up->ier |= UART_IER_RLSI | UART_IER_RDI;
up->port.read_status_mask |= UART_LSR_DR; up->port.read_status_mask |= UART_LSR_DR;
serial_out(up, UART_IER, up->ier); serial_out(up, UART_IER, up->ier);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册