]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tty: serial: fsl_lpuart: disable transmitter before changing RS485 related registers
authorSherry Sun <sherry.sun@nxp.com>
Wed, 12 Mar 2025 02:25:03 +0000 (10:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:32:05 +0000 (14:32 +0200)
commit91264238e9413d3f078b432765cc6830e2d5fe2a
treee19e3b2e2b0559821781bcb30ce529ae217eeb44
parent557f6adcd07dadd48cae5ad304dccae625168d2e
tty: serial: fsl_lpuart: disable transmitter before changing RS485 related registers

[ Upstream commit f5cb528d6441eb860250a2f085773aac4f44085e ]

According to the LPUART reference manual, TXRTSE and TXRTSPOL of MODIR
register only can be changed when the transmitter is disabled.
So disable the transmitter before changing RS485 related registers and
re-enable it after the change is done.

Fixes: 67b01837861c ("tty: serial: lpuart: Add RS485 support for 32-bit uart flavour")
Cc: stable <stable@kernel.org>
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20250312022503.1342990-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