From 31ad60d3f4f236ae46d9930cdfe2e68b87108185 Mon Sep 17 00:00:00 2001 From: Kees Jongenburger Date: Fri, 31 May 2013 16:20:38 +0200 Subject: [PATCH] arm:tty read data until the data buffer is empty. Change-Id: Iaaa7c0bcb40c2cce2423c1defc14809ed6c70e9c --- drivers/tty/arch/earm/rs232.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/tty/arch/earm/rs232.c b/drivers/tty/arch/earm/rs232.c index fe294e7ab..5c273ff44 100644 --- a/drivers/tty/arch/earm/rs232.c +++ b/drivers/tty/arch/earm/rs232.c @@ -739,7 +739,7 @@ read_chars(rs232_t *rs, unsigned int status) lsr = status; - if (lsr & UART_LSR_DR) { + while (lsr & UART_LSR_DR) { c = serial_in(rs, OMAP3_RHR); if (!(rs->ostate & ORAW)) { if (c == rs->oxoff) { @@ -761,6 +761,8 @@ read_chars(rs232_t *rs, unsigned int status) if (rs->icount == 1) { rs->tty->tty_events = 1; } + /* check the line status to know if there are more chars */ + lsr = serial_in(rs, OMAP3_LSR); } }