Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: imx: set receiver level before starting uart

Set the receiver level to something > 0 before calling imx_uart_start_rx
in rs485_config. This is necessary to avoid an interrupt storm that
might prevent the system from booting. This was seen on an i.MX7 device
when the rs485-rts-active-low property was active in the device tree.

Fixes: 6d215f83e5fc ("serial: imx: warn user when using unsupported configuration")
Cc: stable <stable@kernel.org>
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Link: https://lore.kernel.org/r/20240621153829.183780-1-eichest@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Stefan Eichenberger and committed by
Greg Kroah-Hartman
a81dbd04 7c92a8bd

+3 -1
+3 -1
drivers/tty/serial/imx.c
··· 1952 1952 1953 1953 /* Make sure Rx is enabled in case Tx is active with Rx disabled */ 1954 1954 if (!(rs485conf->flags & SER_RS485_ENABLED) || 1955 - rs485conf->flags & SER_RS485_RX_DURING_TX) 1955 + rs485conf->flags & SER_RS485_RX_DURING_TX) { 1956 + imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); 1956 1957 imx_uart_start_rx(port); 1958 + } 1957 1959 1958 1960 return 0; 1959 1961 }