Skip to content

Commit

Permalink
serial: omap: fix the reciever line error case
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shubhrajyoti D authored and Greg Kroah-Hartman committed Sep 26, 2012
1 parent 65ecc9c commit 9a12fcf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/tty/serial/omap-serial.c
Original file line number Diff line number Diff line change
Expand 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)
{
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;
Expand Down

0 comments on commit 9a12fcf

Please sign in to comment.