summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorShubhrajyoti D <shubhrajyoti@ti.com>2012-09-21 20:07:19 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-26 13:33:37 -0700
commit9a12fcf8b1543c99ffcec3d61db86f0dea52dc9d (patch)
tree01461e52f6e0ea5cbbb7ae0492cf7428eb78cbd5 /drivers
parent65ecc9c02dbad033a73a32916d17c107c5b25031 (diff)
downloadlinux-3.10-9a12fcf8b1543c99ffcec3d61db86f0dea52dc9d.tar.gz
linux-3.10-9a12fcf8b1543c99ffcec3d61db86f0dea52dc9d.tar.bz2
linux-3.10-9a12fcf8b1543c99ffcec3d61db86f0dea52dc9d.zip
serial: omap: fix the reciever line error case
This patch does the following - In case of errors if there least one data character in the RX FIFO read it otherwise it may stall the receiver. This is recommended in the interrupt reset method in the table 23-246 of the omap4 TRM. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Tested-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/omap-serial.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 3c05c5ecdfb..ccc2f35adff 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -334,6 +334,10 @@ static unsigned int check_modem_status(struct uart_omap_port *up)
static void serial_omap_rlsi(struct uart_omap_port *up, unsigned int lsr)
{
unsigned int flag;
+ unsigned char ch = 0;
+
+ if (likely(lsr & UART_LSR_DR))
+ ch = serial_in(up, UART_RX);
up->port.icount.rx++;
flag = TTY_NORMAL;