serial: mvebu-uart: clear state register before IRQ request
authorAllen Yan <yanwei@marvell.com>
Fri, 13 Oct 2017 09:01:52 +0000 (11:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Oct 2017 12:20:06 +0000 (14:20 +0200)
commit2ff23c48028a77114757438f9a480c453f68d4b0
tree70ca1e280798a869cd6b35a65f54a4501186d1b9
parent68a0db1d7da20fc99b64debddf71e7c6d1b9e334
serial: mvebu-uart: clear state register before IRQ request

When receiving data on RX pin before ->uart_startup() is called, some
error bits in the state register could be set up (like BRK_DET).

This is harmless when using only the standard UART (error bits are
read-only), but may procude an endless loop once in the extended UART
RX interrupt handler (error bits must be cleared).

Clear the status register in ->uart_startup() to avoid this situation.

Signed-off-by: Allen Yan <yanwei@marvell.com>
Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/mvebu-uart.c