]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Jul 2022 14:29:50 +0000 (16:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Jul 2022 14:29:50 +0000 (16:29 +0200)
added patches:
revert-serial-sc16is7xx-clear-rs485-bits-in-the-shutdown.patch

queue-5.15/revert-serial-sc16is7xx-clear-rs485-bits-in-the-shutdown.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/revert-serial-sc16is7xx-clear-rs485-bits-in-the-shutdown.patch b/queue-5.15/revert-serial-sc16is7xx-clear-rs485-bits-in-the-shutdown.patch
new file mode 100644 (file)
index 0000000..0259553
--- /dev/null
@@ -0,0 +1,42 @@
+From 41c606879f89623dd5269eaffea640b915e9e17c Mon Sep 17 00:00:00 2001
+From: Hui Wang <hui.wang@canonical.com>
+Date: Mon, 18 Apr 2022 17:43:39 +0800
+Subject: Revert "serial: sc16is7xx: Clear RS485 bits in the shutdown"
+
+From: Hui Wang <hui.wang@canonical.com>
+
+commit 41c606879f89623dd5269eaffea640b915e9e17c upstream.
+
+This reverts commit 927728a34f11b5a27f4610bdb7068317d6fdc72a.
+
+Once the uart_port->rs485->flag is set to SER_RS485_ENABLED, the port
+should always work in RS485 mode. If users want the port to leave
+RS485 mode, they need to call ioctl() to clear SER_RS485_ENABLED.
+
+So here we shouldn't clear the RS485 bits in the shutdown().
+
+Fixes: 927728a34f11 ("serial: sc16is7xx: Clear RS485 bits in the shutdown")
+Signed-off-by: Hui Wang <hui.wang@canonical.com>
+Link: https://lore.kernel.org/r/20220418094339.678144-1-hui.wang@canonical.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/sc16is7xx.c |    6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/drivers/tty/serial/sc16is7xx.c
++++ b/drivers/tty/serial/sc16is7xx.c
+@@ -1055,12 +1055,10 @@ static void sc16is7xx_shutdown(struct ua
+       /* Disable all interrupts */
+       sc16is7xx_port_write(port, SC16IS7XX_IER_REG, 0);
+-      /* Disable TX/RX, clear auto RS485 and RTS invert */
++      /* Disable TX/RX */
+       sc16is7xx_port_update(port, SC16IS7XX_EFCR_REG,
+                             SC16IS7XX_EFCR_RXDISABLE_BIT |
+-                            SC16IS7XX_EFCR_TXDISABLE_BIT |
+-                            SC16IS7XX_EFCR_AUTO_RS485_BIT |
+-                            SC16IS7XX_EFCR_RTS_INVERT_BIT,
++                            SC16IS7XX_EFCR_TXDISABLE_BIT,
+                             SC16IS7XX_EFCR_RXDISABLE_BIT |
+                             SC16IS7XX_EFCR_TXDISABLE_BIT);
index c1466df30e4598485eee00a3d75c48ea4186a3c1..59a5bf1e5d49dbadc9be4ddec1c694f0f2d2e90a 100644 (file)
@@ -173,3 +173,4 @@ can-kvaser_usb-replace-run-time-checks-with-struct-kvaser_usb_driver_info.patch
 can-kvaser_usb-kvaser_usb_leaf-fix-can-clock-frequency-regression.patch
 can-kvaser_usb-kvaser_usb_leaf-fix-bittiming-limits.patch
 xfs-remove-incorrect-assert-in-xfs_rename.patch
+revert-serial-sc16is7xx-clear-rs485-bits-in-the-shutdown.patch