Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit a81dbd0

Browse files
eichenbergergregkh
authored andcommitted
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: 6d215f8 ("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>
1 parent 7c92a8b commit a81dbd0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/tty/serial/imx.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1952,8 +1952,10 @@ static int imx_uart_rs485_config(struct uart_port *port, struct ktermios *termio
19521952

19531953
/* Make sure Rx is enabled in case Tx is active with Rx disabled */
19541954
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);
19561957
imx_uart_start_rx(port);
1958+
}
19571959

19581960
return 0;
19591961
}

0 commit comments

Comments
 (0)