tty: serial: fsl_lpuart: correct the count of break characters
authorSherry Sun <sherry.sun@nxp.com>
Mon, 25 Jul 2022 05:01:15 +0000 (13:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:12 +0000 (14:24 +0200)
commitcf0e42eb04c78c7d4d21ea80e72606b0a143c215
tree92a7754c6366ec5772b4073865a0cb3fe5d1f77b
parentef0f4eeaba2463a77ac5a4e42c30717deb3c7b62
tty: serial: fsl_lpuart: correct the count of break characters

[ Upstream commit 707f816f25590c20e056b3bd4a17ce69b03fe856 ]

The LPUART can't distinguish between a break signal and a framing error,
so need to count the break characters if there is a framing error and
received data is zero instead of the parity error.

Fixes: 5541a9bacfe5 ("serial: fsl_lpuart: handle break and make sysrq work")
Reviewed-by: Michael Walle <michael@walle.cc>
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Link: https://lore.kernel.org/r/20220725050115.12396-1-sherry.sun@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/fsl_lpuart.c