serial: 8250: add line error log

Change-Id: I69fe6f0c0857ade25e777be388fcab6261f1a533
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
This commit is contained in:
Huibin Hong
2018-09-12 16:24:05 +08:00
committed by Steven Liu
parent cb6de0208d
commit 116c907ea3

View File

@@ -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;
}