Commit 9a12fcf8 authored by Shubhrajyoti D's avatar Shubhrajyoti D Committed by Greg Kroah-Hartman

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: default avatarShubhrajyoti D <shubhrajyoti@ti.com>
Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
Tested-by: default avatarKevin Hilman <khilman@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 65ecc9c0
...@@ -334,6 +334,10 @@ static unsigned int check_modem_status(struct uart_omap_port *up) ...@@ -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) static void serial_omap_rlsi(struct uart_omap_port *up, unsigned int lsr)
{ {
unsigned int flag; unsigned int flag;
unsigned char ch = 0;
if (likely(lsr & UART_LSR_DR))
ch = serial_in(up, UART_RX);
up->port.icount.rx++; up->port.icount.rx++;
flag = TTY_NORMAL; flag = TTY_NORMAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment