-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
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.
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 | 5 +++++
+ 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
+++ /dev/null
-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
-
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
-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
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.
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 | 5 +++++
+ 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
+++ /dev/null
-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
-
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