]> git.itanic.dy.fi Git - linux-stable/commit
serial: fsl_lpuart: Reset prior to registration
authorLukas Wunner <lukas@wunner.de>
Sun, 11 Sep 2022 08:22:01 +0000 (10:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:11:54 +0000 (11:11 +0200)
commit4199425b11325e893661d03f92330dd1adae03b0
tree8b852ceae29da534efbc6e275d4d1da63fa6b393
parentcc1504f6da2e81ab249eb801739c8fc0c1fd121f
serial: fsl_lpuart: Reset prior to registration

commit 60f361722ad2ae5ee667d0b0545d40c42f754daf upstream.

Since commit bd5305dcabbc ("tty: serial: fsl_lpuart: do software reset
for imx7ulp and imx8qxp"), certain i.MX UARTs are reset after they've
already been registered.  Register state may thus be clobbered after
user space has begun to open and access the UART.

Avoid by performing the reset prior to registration.

Fixes: bd5305dcabbc ("tty: serial: fsl_lpuart: do software reset for imx7ulp and imx8qxp")
Cc: stable@vger.kernel.org # v5.15+
Cc: Fugang Duan <fugang.duan@nxp.com>
Cc: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Link: https://lore.kernel.org/r/72fb646c1b0b11c989850c55f52f9ff343d1b2fa.1662884345.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/fsl_lpuart.c