浏览代码

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 <eric.nelson@boundarydevices.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eric Nelson 11 年之前
父节点
当前提交
8d267fd98b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/tty/serial/imx.c

+ 1 - 1
drivers/tty/serial/imx.c

@@ -733,7 +733,7 @@ static irqreturn_t imx_rxint(int irq, void *dev_id)
 				continue;
 				continue;
 			}
 			}
 
 
-			rx &= sport->port.read_status_mask;
+			rx &= (sport->port.read_status_mask | 0xFF);
 
 
 			if (rx & URXD_BRK)
 			if (rx & URXD_BRK)
 				flg = TTY_BREAK;
 				flg = TTY_BREAK;