From: Eric Nelson Date: Thu, 18 Dec 2014 19:37:13 +0000 (-0700) Subject: serial: imx: preserve characters with parity or framing errors X-Git-Tag: firefly_0821_release~176^2~2319^2~75 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8d267fd98b7706a6296409b69bf2cca42087a9ef;p=firefly-linux-kernel-4.4.55.git serial: imx: preserve characters with parity or framing errors If IGNPAR/INPCK are clear in termios->c_iflag, characters received with parity or framing errors should be preserved and passed to the upper layers of the tty stack. Specifically, the decision of whether to set the character value to zero should be made by n_tty.c/n_tty_receive_parity_error(). Signed-off-by: Eric Nelson Reviewed-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 72b800b296b1..6ac22d75a4bb 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -733,7 +733,7 @@ static irqreturn_t imx_rxint(int irq, void *dev_id) continue; } - rx &= sport->port.read_status_mask; + rx &= (sport->port.read_status_mask | 0xFF); if (rx & URXD_BRK) flg = TTY_BREAK;