Skip to content

Commit

Permalink
serial: 8250: add line error log
Browse files Browse the repository at this point in the history
Change-Id: I69fe6f0c0857ade25e777be388fcab6261f1a533
Signed-off-by: Huibin Hong <[email protected]>
  • Loading branch information
Huibin Hong authored and Steven-LiuSF committed Jul 20, 2021
1 parent cb6de02 commit 116c907
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions drivers/tty/serial/8250/8250_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,22 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir)
if ((!up->dma || up->dma->tx_err) && (status & UART_LSR_THRE) &&
(up->ier & UART_IER_THRI))
serial8250_tx_chars(up);
#ifdef CONFIG_ARCH_ROCKCHIP
if (status & UART_LSR_BRK_ERROR_BITS) {

if (status & UART_LSR_OE)
pr_err("%s: Overrun error!\n", port->name);
if (status & UART_LSR_PE)
pr_err("%s: Parity error!\n", port->name);
if (status & UART_LSR_FE)
pr_err("%s: Frame error!\n", port->name);
if (status & UART_LSR_BI)
pr_err("%s: Break interrupt!\n", port->name);

pr_err("%s: maybe rx pin is low or baudrate is not correct!\n",
port->name);
}
#endif
uart_unlock_and_check_sysrq(port, flags);
return 1;
}
Expand Down

0 comments on commit 116c907

Please sign in to comment.