]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jul 2024 14:08:16 +0000 (16:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jul 2024 14:08:16 +0000 (16:08 +0200)
added patches:
serial-imx-set-receiver-level-before-starting-uart.patch

queue-4.19/serial-imx-set-receiver-level-before-starting-uart.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/serial-imx-set-receiver-level-before-starting-uart.patch b/queue-4.19/serial-imx-set-receiver-level-before-starting-uart.patch
new file mode 100644 (file)
index 0000000..21fdc20
--- /dev/null
@@ -0,0 +1,37 @@
+From a81dbd0463eca317eee44985a66aa6cc2ce5c101 Mon Sep 17 00:00:00 2001
+From: Stefan Eichenberger <stefan.eichenberger@toradex.com>
+Date: Fri, 21 Jun 2024 17:37:49 +0200
+Subject: serial: imx: set receiver level before starting uart
+
+From: Stefan Eichenberger <stefan.eichenberger@toradex.com>
+
+commit a81dbd0463eca317eee44985a66aa6cc2ce5c101 upstream.
+
+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>
+---
+ drivers/tty/serial/imx.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/tty/serial/imx.c
++++ b/drivers/tty/serial/imx.c
+@@ -1860,8 +1860,10 @@ static int imx_uart_rs485_config(struct
+       /* Make sure Rx is enabled in case Tx is active with Rx disabled */
+       if (!(rs485conf->flags & SER_RS485_ENABLED) ||
+-          rs485conf->flags & SER_RS485_RX_DURING_TX)
++          rs485conf->flags & SER_RS485_RX_DURING_TX) {
++              imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT);
+               imx_uart_start_rx(port);
++      }
+       port->rs485 = *rs485conf;
index f7e50db45e3aa8b753a4af8e982b0c44e1812cbe..0385f6d3514aff7ec8dc9457704f9c03fa16e24d 100644 (file)
@@ -136,3 +136,4 @@ net-usb-ax88179_178a-improve-link-status-logs.patch
 usb-gadget-printer-ss-support.patch
 usb-musb-da8xx-fix-a-resource-leak-in-probe.patch
 usb-atm-cxacru-fix-endpoint-checking-in-cxacru_bind.patch
+serial-imx-set-receiver-level-before-starting-uart.patch