linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: mvebu_uart: fix tx lost characters
@ 2018-02-22 20:30 Gabriel Matni
  2018-02-27 13:12 ` Miquel Raynal
  0 siblings, 1 reply; 7+ messages in thread
From: Gabriel Matni @ 2018-02-22 20:30 UTC (permalink / raw)
  To: linux-arm-kernel

From: Gabriel Matni <gabriel.matni@exfo.com>

Fixes missing characters on kernel console at low baud rates (i.e.9600).
The driver should poll TX_RDY instead of TX_EMPTY to ensure that the
transmitter holding is ready to receive a new byte. Polling TX_EMPTY isn't
enough as the hardware buffer can become empty but not yet ready for CPU to
write the next byte.

Signed-off-by: Gabriel Matni <gabriel.matni@exfo.com>
---
drivers/tty/serial/mvebu-uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c
index a100e98259d7..f0df0640208e 100644
--- a/drivers/tty/serial/mvebu-uart.c
+++ b/drivers/tty/serial/mvebu-uart.c
@@ -618,7 +618,7 @@ static void wait_for_xmitr(struct uart_port *port)
   u32 val;

   readl_poll_timeout_atomic(port->membase + UART_STAT, val,
-             (val & STAT_TX_EMP), 1, 10000);
+             (val & STAT_TX_RDY(port)), 1, 10000);
}

static void mvebu_uart_console_putchar(struct uart_port *port, int ch)
--
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-03-06 15:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-22 20:30 [PATCH] serial: mvebu_uart: fix tx lost characters Gabriel Matni
2018-02-27 13:12 ` Miquel Raynal
2018-02-27 21:56   ` Gabriel Matni
2018-03-05  9:47     ` Miquel Raynal
2018-03-05 10:10       ` Miquel Raynal
2018-03-05 13:42         ` Gregory CLEMENT
2018-03-06 15:39           ` Gabriel Matni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).