From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@lists.linux.dev, "linux-serial@vger.kernel.org,
stable@vger.kernel.org,
Rasmus Villemoes" <linux@rasmusvillemoes.dk>,
Dominique MARTINET <dominique.martinet@atmark-techno.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: [PATCH 5.15 08/10] serial: fixup backport of "serial: Deassert Transmit Enable on probe in driver-specific way"
Date: Thu, 12 Jan 2023 14:56:45 +0100 [thread overview]
Message-ID: <20230112135327.007152369@linuxfoundation.org> (raw)
In-Reply-To: <20230112135326.689857506@linuxfoundation.org>
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
When 7c7f9bc986e6 ("serial: Deassert Transmit Enable on probe in
driver-specific way") got backported to 5.15.y, there known as
b079d3775237, some hunks were accidentally left out.
In fsl_lpuart.c, this amounts to uart_remove_one_port() being called
in an error path despite uart_add_one_port() not having been called.
In serial_core.c, it is possible that the omission in
uart_suspend_port() is harmless, but the backport did have the
corresponding hunk in uart_resume_port(), it runs counter to the
original commit's intention of
Skip any invocation of ->set_mctrl() if RS485 is enabled.
and it's certainly better to be aligned with upstream.
Fixes: b079d3775237 ("serial: Deassert Transmit Enable on probe in driver-specific way")
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Dominique MARTINET <dominique.martinet@atmark-techno.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/serial/fsl_lpuart.c | 2 +-
drivers/tty/serial/serial_core.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -2784,9 +2784,9 @@ static int lpuart_probe(struct platform_
return 0;
failed_irq_request:
-failed_get_rs485:
uart_remove_one_port(&lpuart_reg, &sport->port);
failed_attach_port:
+failed_get_rs485:
failed_reset:
lpuart_disable_clks(sport);
return ret;
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -2225,7 +2225,8 @@ int uart_suspend_port(struct uart_driver
spin_lock_irq(&uport->lock);
ops->stop_tx(uport);
- ops->set_mctrl(uport, 0);
+ if (!(uport->rs485.flags & SER_RS485_ENABLED))
+ ops->set_mctrl(uport, 0);
ops->stop_rx(uport);
spin_unlock_irq(&uport->lock);
next prev parent reply other threads:[~2023-01-12 13:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 13:56 [PATCH 5.15 00/10] 5.15.88-rc1 review Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 5.15 01/10] parisc: Align parisc MADV_XXX constants with all other architectures Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 5.15 02/10] x86/fpu: Take task_struct* in copy_sigframe_from_user_to_xstate() Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 5.15 03/10] x86/fpu: Add a pkru argument to copy_uabi_from_kernel_to_xstate() Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 5.15 04/10] x86/fpu: Add a pkru argument to copy_uabi_to_xstate() Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 5.15 05/10] x86/fpu: Allow PKRU to be (once again) written by ptrace Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 5.15 06/10] x86/fpu: Emulate XRSTORs behavior if the xfeatures PKRU bit is not set Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 5.15 07/10] selftests/vm/pkeys: Add a regression test for setting PKRU through ptrace Greg Kroah-Hartman
2023-01-12 13:56 ` Greg Kroah-Hartman [this message]
2023-01-12 13:56 ` [PATCH 5.15 09/10] net: sched: disallow noqueue for qdisc classes Greg Kroah-Hartman
2023-01-12 13:56 ` [PATCH 5.15 10/10] net/ulp: prevent ULP without clone op from entering the LISTEN status Greg Kroah-Hartman
2023-01-12 20:52 ` [PATCH 5.15 00/10] 5.15.88-rc1 review Florian Fainelli
2023-01-13 0:28 ` Shuah Khan
2023-01-13 1:36 ` Kelsey Steele
2023-01-13 4:15 ` Bagas Sanjaya
2023-01-13 5:50 ` Guenter Roeck
2023-01-13 12:32 ` Sudip Mukherjee
2023-01-13 13:19 ` Jon Hunter
2023-01-13 17:42 ` Naresh Kamboju
2023-01-13 18:00 ` Allen Pais
2023-01-13 23:39 ` Ron Economos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230112135327.007152369@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=dominique.martinet@atmark-techno.com \
--cc=linux@rasmusvillemoes.dk \
--cc=patches@lists.linux.dev \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.