summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/owl-uart.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2022-04-11 12:45:05 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-14 18:27:18 +0200
commitd9b80d07db686402bbb3b237692a98da93125ace (patch)
tree426c6ad9c6ba77eb51461d7413a6f0c0c35dbc66 /drivers/tty/serial/owl-uart.c
parent83ead219292afb5dd401b68c4ee3becf8d26b6e4 (diff)
tty: serial: owl-uart, send x_char even if stopped
Flow control characters should be sent even if the TX is stopped. So fix owl-uart to behave the same as other drivers. This unification also allows the use of the TX helper in the future. Cc: "Andreas Färber" <afaerber@suse.de> Cc: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220411104506.8990-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/owl-uart.c')
-rw-r--r--drivers/tty/serial/owl-uart.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/owl-uart.c b/drivers/tty/serial/owl-uart.c
index 5250bd7d390a..5ff7c89aeb06 100644
--- a/drivers/tty/serial/owl-uart.c
+++ b/drivers/tty/serial/owl-uart.c
@@ -184,9 +184,6 @@ static void owl_uart_send_chars(struct uart_port *port)
struct circ_buf *xmit = &port->state->xmit;
unsigned int ch;
- if (uart_tx_stopped(port))
- return;
-
if (port->x_char) {
while (!(owl_uart_read(port, OWL_UART_STAT) & OWL_UART_STAT_TFFU))
cpu_relax();
@@ -195,6 +192,9 @@ static void owl_uart_send_chars(struct uart_port *port)
port->x_char = 0;
}
+ if (uart_tx_stopped(port))
+ return;
+
while (!(owl_uart_read(port, OWL_UART_STAT) & OWL_UART_STAT_TFFU)) {
if (uart_circ_empty(xmit))
break;