From: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>
To: <gregkh@linuxfoundation.org>, <jirislaby@kernel.org>,
<linux-serial@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <quic_msavaliy@quicinc.com>, <dianders@chromium.org>
Subject: Re: [PATCH] serial: core: Do stop_rx in suspend path for console if console_suspend is disabled
Date: Mon, 16 May 2022 14:55:50 +0530 [thread overview]
Message-ID: <0eedc244-5c8a-c734-8bba-09a66d050a4e@quicinc.com> (raw)
In-Reply-To: <1651484835-25189-1-git-send-email-quic_vnivarth@quicinc.com>
This patch will be dropped.
Uploaded this change as v4 of an earlier patch.
Apologies for trouble.
On 5/2/2022 3:17 PM, Vijaya Krishna Nivarthi wrote:
> For the case of console_suspend disabled, if back to back suspend/resume
> test is executed, at the end of test, sometimes console would appear to
> be frozen not responding to input. This would happen because, during
> resume, rx transactions can come in before system is ready, malfunction
> of rx happens in turn resulting in console appearing to be stuck.
>
> Do a stop_rx in suspend sequence to prevent this.
>
> Signed-off-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>
> ---
> drivers/tty/serial/serial_core.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
> index 82a1770..e8c6875 100644
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -2211,9 +2211,16 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport)
> }
> put_device(tty_dev);
>
> - /* Nothing to do if the console is not suspending */
> - if (!console_suspend_enabled && uart_console(uport))
> + /*
> + * Nothing to do if the console is not suspending
> + * except stop_rx to prevent any asynchronous data
> + * over RX line. Re start_rx, when required, is
> + * done by set_termios in resume sequence
> + */
> + if (!console_suspend_enabled && uart_console(uport)) {
> + uport->ops->stop_rx(uport);
> goto unlock;
> + }
>
> uport->suspended = 1;
>
prev parent reply other threads:[~2022-05-16 9:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-02 9:47 Vijaya Krishna Nivarthi
2022-05-16 9:25 ` Vijaya Krishna Nivarthi [this message]
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=0eedc244-5c8a-c734-8bba-09a66d050a4e@quicinc.com \
--to=quic_vnivarth@quicinc.com \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=quic_msavaliy@quicinc.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®