serial: Fix IGNBRK handling
commit ef8b9ddc upstream. If IGNBRK is set without either BRKINT or PARMRK set, some uart drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the line discipline, when it should send either nothing or the TTYBREAK flag set. This happens because the read_status_mask masks out the BI condition, which uart_insert_char() then interprets as a normal 0x00 byte. SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General Terminal Interface - Input Modes, states: "If IGNBRK is set, a break condition detected on input shall be ignored; that is, not put on the input queue and therefore not read by any process." Fix read_status_mask to include the BI bit if IGNBRK is set; the lsr status retains the BI bit if a BREAK is recv'd, which is subsequently ignored in uart_insert_char() when masked with the ignore_status_mask. Affected drivers: 8250 - all serial_txx9 mfd amba-pl010 amba-pl011 atmel_serial bfin_uart dz ip22zilog m...
Showing
- drivers/tty/serial/8250/8250_core.c 1 addition, 1 deletiondrivers/tty/serial/8250/8250_core.c
- drivers/tty/serial/altera_uart.c 6 additions, 0 deletionsdrivers/tty/serial/altera_uart.c
- drivers/tty/serial/amba-pl010.c 1 addition, 1 deletiondrivers/tty/serial/amba-pl010.c
- drivers/tty/serial/amba-pl011.c 1 addition, 1 deletiondrivers/tty/serial/amba-pl011.c
- drivers/tty/serial/atmel_serial.c 1 addition, 1 deletiondrivers/tty/serial/atmel_serial.c
- drivers/tty/serial/bcm63xx_uart.c 1 addition, 1 deletiondrivers/tty/serial/bcm63xx_uart.c
- drivers/tty/serial/bfin_uart.c 1 addition, 1 deletiondrivers/tty/serial/bfin_uart.c
- drivers/tty/serial/dz.c 1 addition, 1 deletiondrivers/tty/serial/dz.c
- drivers/tty/serial/efm32-uart.c 1 addition, 1 deletiondrivers/tty/serial/efm32-uart.c
- drivers/tty/serial/fsl_lpuart.c 1 addition, 1 deletiondrivers/tty/serial/fsl_lpuart.c
- drivers/tty/serial/ip22zilog.c 1 addition, 1 deletiondrivers/tty/serial/ip22zilog.c
- drivers/tty/serial/m32r_sio.c 1 addition, 1 deletiondrivers/tty/serial/m32r_sio.c
- drivers/tty/serial/max310x.c 1 addition, 1 deletiondrivers/tty/serial/max310x.c
- drivers/tty/serial/mcf.c 6 additions, 0 deletionsdrivers/tty/serial/mcf.c
- drivers/tty/serial/mfd.c 1 addition, 1 deletiondrivers/tty/serial/mfd.c
- drivers/tty/serial/mpsc.c 1 addition, 1 deletiondrivers/tty/serial/mpsc.c
- drivers/tty/serial/msm_serial.c 1 addition, 1 deletiondrivers/tty/serial/msm_serial.c
- drivers/tty/serial/mxs-auart.c 1 addition, 1 deletiondrivers/tty/serial/mxs-auart.c
- drivers/tty/serial/netx-serial.c 1 addition, 1 deletiondrivers/tty/serial/netx-serial.c
- drivers/tty/serial/pmac_zilog.c 1 addition, 1 deletiondrivers/tty/serial/pmac_zilog.c
Please register or sign in to comment