]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fix up backport of serial-ar933x-deassert-transmit-enable-on-rs485_conf.patch
authorSasha Levin <sashal@kernel.org>
Sat, 5 Nov 2022 13:48:37 +0000 (09:48 -0400)
committerSasha Levin <sashal@kernel.org>
Sat, 5 Nov 2022 13:48:37 +0000 (09:48 -0400)
queue-5.10/serial-ar933x-deassert-transmit-enable-on-rs485_conf.patch
queue-5.10/serial-ar933x-remove-superfluous-code-in-ar933x_conf.patch [deleted file]
queue-5.10/series
queue-5.15/serial-ar933x-deassert-transmit-enable-on-rs485_conf.patch
queue-5.15/serial-ar933x-remove-superfluous-code-in-ar933x_conf.patch [deleted file]
queue-5.15/series

index 322347cb10aa96f904fa21e6bf8ebf6347cbbdda..b9357ed8b22303642494cb938ceeae9929f1627a 100644 (file)
@@ -1,6 +1,6 @@
-From ed5a30b1b62a514b606e883884676bac9b544c25 Mon Sep 17 00:00:00 2001
+From 9a1e798893679aeb400f255fdacdd066087c0ed6 Mon Sep 17 00:00:00 2001
 From: Sasha Levin <sashal@kernel.org>
-Date: Sun, 11 Sep 2022 11:12:15 +0200
+Date: Sat, 5 Nov 2022 09:46:40 -0400
 Subject: serial: ar933x: Deassert Transmit Enable on ->rs485_config()
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
@@ -8,7 +8,7 @@ Content-Transfer-Encoding: 8bit
 
 From: Lukas Wunner <lukas@wunner.de>
 
-[ Upstream commit 3a939433ddc1bab98be028903aaa286e5e7461d7 ]
+commit 3a939433ddc1bab98be028903aaa286e5e7461d7 upstream.
 
 The ar933x_uart driver neglects to deassert Transmit Enable when
 ->rs485_config() is invoked.  Fix it.
@@ -16,33 +16,29 @@ The ar933x_uart driver neglects to deassert Transmit Enable when
 Fixes: 9be1064fe524 ("serial: ar933x_uart: add RS485 support")
 Cc: stable@vger.kernel.org # v5.7+
 Cc: Daniel Golle <daniel@makrotopia.org>
-Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
+Reviewed-by: Ilpo JÃ\83â\82¬rvinen <ilpo.jarvinen@linux.intel.com>
 Signed-off-by: Lukas Wunner <lukas@wunner.de>
-Link: https://lore.kernel.org/r/5b36af26e57553f084334666e7d24c7fd131a01e.1662887231.git.lukas@wunner.de
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/tty/serial/ar933x_uart.c | 7 +++++++
- 1 file changed, 7 insertions(+)
+ drivers/tty/serial/ar933x_uart.c | +++++
+ 1 file changed, 5 insertions(+)
 
 diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c
-index be3f5d8f683b..23f2d9937cfc 100644
+index 4379ca4842ae..0f2677695b52 100644
 --- a/drivers/tty/serial/ar933x_uart.c
 +++ b/drivers/tty/serial/ar933x_uart.c
-@@ -585,6 +585,13 @@ static const struct uart_ops ar933x_uart_ops = {
- static int ar933x_config_rs485(struct uart_port *port,
-                               struct serial_rs485 *rs485conf)
- {
-+      struct ar933x_uart_port *up =
-+                      container_of(port, struct ar933x_uart_port, port);
+@@ -591,6 +591,11 @@ static int ar933x_config_rs485(struct uart_port *port,
+               dev_err(port->dev, "RS485 needs rts-gpio\n");
+               return 1;
+       }
 +
-+      if (port->rs485.flags & SER_RS485_ENABLED)
++      if (rs485conf->flags & SER_RS485_ENABLED)
 +              gpiod_set_value(up->rts_gpiod,
 +                      !!(rs485conf->flags & SER_RS485_RTS_AFTER_SEND));
 +
+       port->rs485 = *rs485conf;
        return 0;
  }
 -- 
 2.35.1
 
diff --git a/queue-5.10/serial-ar933x-remove-superfluous-code-in-ar933x_conf.patch b/queue-5.10/serial-ar933x-remove-superfluous-code-in-ar933x_conf.patch
deleted file mode 100644 (file)
index 6fcf724..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-From 5f883654fb7bc06350c4f9c8b07b0690bb946879 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sun, 10 Jul 2022 18:44:36 +0200
-Subject: serial: ar933x: Remove superfluous code in ar933x_config_rs485()
-
-From: Lino Sanfilippo <l.sanfilippo@kunbus.com>
-
-[ Upstream commit 184842622c97da2f88f365a981af05432baa5385 ]
-
-In ar933x_config_rs485() the check for the RTS GPIO is not needed since in
-case the GPIO is not available at driver init ar933x_no_rs485 is assigned
-to port->rs485_supported and this function is never called. So remove the
-check.
-
-Also in uart_set_rs485_config() the serial core already assigns the passed
-serial_rs485 struct to the uart port. So remove the assignment in the
-drivers rs485_config() function to avoid redundancy.
-
-Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
-Link: https://lore.kernel.org/r/20220710164442.2958979-3-LinoSanfilippo@gmx.de
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Stable-dep-of: 3a939433ddc1 ("serial: ar933x: Deassert Transmit Enable on ->rs485_config()")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/tty/serial/ar933x_uart.c | 9 ---------
- 1 file changed, 9 deletions(-)
-
-diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c
-index c2be7cf91399..be3f5d8f683b 100644
---- a/drivers/tty/serial/ar933x_uart.c
-+++ b/drivers/tty/serial/ar933x_uart.c
-@@ -585,15 +585,6 @@ static const struct uart_ops ar933x_uart_ops = {
- static int ar933x_config_rs485(struct uart_port *port,
-                               struct serial_rs485 *rs485conf)
- {
--      struct ar933x_uart_port *up =
--              container_of(port, struct ar933x_uart_port, port);
--
--      if ((rs485conf->flags & SER_RS485_ENABLED) &&
--          !up->rts_gpiod) {
--              dev_err(port->dev, "RS485 needs rts-gpio\n");
--              return 1;
--      }
--      port->rs485 = *rs485conf;
-       return 0;
- }
--- 
-2.35.1
-
index e68c0a3947948a83208cbdae61d7c5e4e6e56f77..135ef59a1937288c48b38ffb7a70986d50ae1542 100644 (file)
@@ -1,5 +1,4 @@
 serial-8250-let-drivers-request-full-16550a-feature-.patch
-serial-ar933x-remove-superfluous-code-in-ar933x_conf.patch
 serial-ar933x-deassert-transmit-enable-on-rs485_conf.patch
 kvm-nvmx-pull-kvm-l0-s-desired-controls-directly-fro.patch
 kvm-nvmx-don-t-propagate-vmcs12-s-perf_global_ctrl-s.patch
index 445d54619ae10b37cf8b2eb9cf4e34c0ff297c21..b9357ed8b22303642494cb938ceeae9929f1627a 100644 (file)
@@ -1,6 +1,6 @@
-From c737ecf2d493533f6062300c0ada22c5788ce0c5 Mon Sep 17 00:00:00 2001
+From 9a1e798893679aeb400f255fdacdd066087c0ed6 Mon Sep 17 00:00:00 2001
 From: Sasha Levin <sashal@kernel.org>
-Date: Sun, 11 Sep 2022 11:12:15 +0200
+Date: Sat, 5 Nov 2022 09:46:40 -0400
 Subject: serial: ar933x: Deassert Transmit Enable on ->rs485_config()
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
@@ -8,7 +8,7 @@ Content-Transfer-Encoding: 8bit
 
 From: Lukas Wunner <lukas@wunner.de>
 
-[ Upstream commit 3a939433ddc1bab98be028903aaa286e5e7461d7 ]
+commit 3a939433ddc1bab98be028903aaa286e5e7461d7 upstream.
 
 The ar933x_uart driver neglects to deassert Transmit Enable when
 ->rs485_config() is invoked.  Fix it.
@@ -16,33 +16,29 @@ The ar933x_uart driver neglects to deassert Transmit Enable when
 Fixes: 9be1064fe524 ("serial: ar933x_uart: add RS485 support")
 Cc: stable@vger.kernel.org # v5.7+
 Cc: Daniel Golle <daniel@makrotopia.org>
-Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
+Reviewed-by: Ilpo JÃ\83â\82¬rvinen <ilpo.jarvinen@linux.intel.com>
 Signed-off-by: Lukas Wunner <lukas@wunner.de>
-Link: https://lore.kernel.org/r/5b36af26e57553f084334666e7d24c7fd131a01e.1662887231.git.lukas@wunner.de
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/tty/serial/ar933x_uart.c | 7 +++++++
- 1 file changed, 7 insertions(+)
+ drivers/tty/serial/ar933x_uart.c | +++++
+ 1 file changed, 5 insertions(+)
 
 diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c
-index 7e89e563359a..394e960fd33c 100644
+index 4379ca4842ae..0f2677695b52 100644
 --- a/drivers/tty/serial/ar933x_uart.c
 +++ b/drivers/tty/serial/ar933x_uart.c
-@@ -583,6 +583,13 @@ static const struct uart_ops ar933x_uart_ops = {
- static int ar933x_config_rs485(struct uart_port *port,
-                               struct serial_rs485 *rs485conf)
- {
-+      struct ar933x_uart_port *up =
-+                      container_of(port, struct ar933x_uart_port, port);
+@@ -591,6 +591,11 @@ static int ar933x_config_rs485(struct uart_port *port,
+               dev_err(port->dev, "RS485 needs rts-gpio\n");
+               return 1;
+       }
 +
-+      if (port->rs485.flags & SER_RS485_ENABLED)
++      if (rs485conf->flags & SER_RS485_ENABLED)
 +              gpiod_set_value(up->rts_gpiod,
 +                      !!(rs485conf->flags & SER_RS485_RTS_AFTER_SEND));
 +
+       port->rs485 = *rs485conf;
        return 0;
  }
 -- 
 2.35.1
 
diff --git a/queue-5.15/serial-ar933x-remove-superfluous-code-in-ar933x_conf.patch b/queue-5.15/serial-ar933x-remove-superfluous-code-in-ar933x_conf.patch
deleted file mode 100644 (file)
index 04a2f1a..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-From 5aa54b067a13313f3088aed18bcc55bbe955e38c Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sun, 10 Jul 2022 18:44:36 +0200
-Subject: serial: ar933x: Remove superfluous code in ar933x_config_rs485()
-
-From: Lino Sanfilippo <l.sanfilippo@kunbus.com>
-
-[ Upstream commit 184842622c97da2f88f365a981af05432baa5385 ]
-
-In ar933x_config_rs485() the check for the RTS GPIO is not needed since in
-case the GPIO is not available at driver init ar933x_no_rs485 is assigned
-to port->rs485_supported and this function is never called. So remove the
-check.
-
-Also in uart_set_rs485_config() the serial core already assigns the passed
-serial_rs485 struct to the uart port. So remove the assignment in the
-drivers rs485_config() function to avoid redundancy.
-
-Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
-Link: https://lore.kernel.org/r/20220710164442.2958979-3-LinoSanfilippo@gmx.de
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Stable-dep-of: 3a939433ddc1 ("serial: ar933x: Deassert Transmit Enable on ->rs485_config()")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/tty/serial/ar933x_uart.c | 9 ---------
- 1 file changed, 9 deletions(-)
-
-diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c
-index 4379ca4842ae..7e89e563359a 100644
---- a/drivers/tty/serial/ar933x_uart.c
-+++ b/drivers/tty/serial/ar933x_uart.c
-@@ -583,15 +583,6 @@ static const struct uart_ops ar933x_uart_ops = {
- static int ar933x_config_rs485(struct uart_port *port,
-                               struct serial_rs485 *rs485conf)
- {
--      struct ar933x_uart_port *up =
--              container_of(port, struct ar933x_uart_port, port);
--
--      if ((rs485conf->flags & SER_RS485_ENABLED) &&
--          !up->rts_gpiod) {
--              dev_err(port->dev, "RS485 needs rts-gpio\n");
--              return 1;
--      }
--      port->rs485 = *rs485conf;
-       return 0;
- }
--- 
-2.35.1
-
index 4cc33183d09359ad18a7be72b43db347e50747ee..bffbf9a7f590e7772cc10a4fb6e112512f3a9a42 100644 (file)
@@ -3,7 +3,6 @@ scsi-lpfc-adjust-cmf-total-bytes-and-rxmonitor.patch
 scsi-lpfc-rework-mib-rx-monitor-debug-info-logic.patch
 scsi-qla2xxx-enhance-driver-tracing-with-separate-tu.patch
 scsi-qla2xxx-define-static-symbols.patch
-serial-ar933x-remove-superfluous-code-in-ar933x_conf.patch
 serial-ar933x-deassert-transmit-enable-on-rs485_conf.patch
 kvm-x86-trace-re-injected-exceptions.patch
 kvm-x86-treat-dbs-from-the-emulator-as-fault-like-co.patch