linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>,
	<gregkh@linuxfoundation.org>, <jirislaby@kernel.org>,
	<linux-serial@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <quic_msavaliy@quicinc.com>, <dianders@chromium.org>,
	<mka@chromium.org>, <swboyd@chromium.org>
Subject: Re: [V4] serial: core: Do stop_rx in suspend path for console if console_suspend is disabled
Date: Thu, 2 Jun 2022 21:12:31 +0530	[thread overview]
Message-ID: <cb802fb1-d0b8-68af-1c04-f73bc1beca77@quicinc.com> (raw)
In-Reply-To: <fb44af37-daf7-974d-95fe-1a6c2cdab676@samsung.com>

Hi,


On 6/2/2022 3:55 AM, Marek Szyprowski wrote:
> Hi,
>
> On 01.06.2022 13:24, Vijaya Krishna Nivarthi wrote:
>> On 5/24/2022 5:24 PM, Marek Szyprowski wrote:
>>> On 23.05.2022 23:32, Marek Szyprowski wrote:
>>>> Hi,
>>>>
>>>> On 16.05.2022 11:20, 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>
>>>>> ---
>>>>> v4: moved the change to serial core to apply for all drivers
>>>>> v3: swapped the order of conditions to be more human readable
>>>>> v2: restricted patch to contain only stop_rx in suspend sequence
>>>>> v1: intial patch contained 2 additional unrelated changes in vicinity
>>>>> ---
>>>> This patch landed recently in linux-next as commit c9d2325cdb92
>>>> ("serial: core: Do stop_rx in suspend path for console if
>>>> console_suspend is disabled").
>>>>
>>>> Unfortunately it breaks console operation on my test systems after
>>>> system suspend/resume cycle if 'no_console_suspend' kernel parameter
>>>> is present. System properly resumes from suspend, the console displays
>>>> all the messages and even command line prompt, but then doesn't react
>>>> on any input. If I remove the 'no_console_suspend' parameter, the
>>>> console is again operational after system suspend/resume cycle. Before
>>>> this patch it worked fine regardless the 'no_console_suspend'
>>>> parameter.
>>>>
>>>> If this matters, the test system is ARM 32bit Samsung Exynos5422-based
>>>> Odroid XU3lite board.
>>> One more information. This issue can be easily reproduced with QEMU. It
>>> happens both on ARM 32bit and ARM 64bit QEMU's 'virt' machines when
>>> 'no_console_suspend' is added to kernel's cmdline.
>>>
>> Ideally, as comments indicate, the set_termios should have done
>> stop_rx at begin and start_rx at end to take care of this issue.
>>
>> This is probably missing in your driver. Can we check if this can be
>> fixed?
> Sure, just point me what need to be added in amba-pl011.c and
> samsung_tty.c. I've briefly compared the suspend/resume paths of those
> drivers with other drivers and I don't see anything missing there.
>
>> OR other option is
>>
>> Add a start_rx in uart_resume_port after call to set_termios to handle
>> this scenario for other drivers.
>>
>> Please let me know if there are any concerns for this options.
> IMHO this looks like an issue that affects lots of drivers and it should
> be handled in the core.

Sure, we will look into both aspects and get back as soon as possible.

Thank you.

>
>   > ...
>
> Best regards

  reply	other threads:[~2022-06-02 15:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  9:20 [V4] serial: core: Do stop_rx in suspend path for console if console_suspend is disabled Vijaya Krishna Nivarthi
     [not found] ` <CGME20220523213246eucas1p2d0da08d931a996cd3410eda1c2fd48c0@eucas1p2.samsung.com>
2022-05-23 21:32   ` Marek Szyprowski
     [not found]     ` <CGME20220524115408eucas1p1ddda7aae4db0a65a7d67d6f8c59d404b@eucas1p1.samsung.com>
2022-05-24 11:54       ` Marek Szyprowski
2022-06-01 11:24         ` Vijaya Krishna Nivarthi
2022-06-01 22:25           ` Marek Szyprowski
2022-06-02 15:42             ` Vijaya Krishna Nivarthi [this message]
2022-06-03 18:54               ` Vijaya Krishna Nivarthi
2022-06-03 19:28                 ` Doug Anderson
2022-06-06 12:30                   ` Vijaya Krishna Nivarthi
2022-06-07 13:22     ` Greg KH
2022-06-07 13:25       ` Vijaya Krishna Nivarthi

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=cb802fb1-d0b8-68af-1c04-f73bc1beca77@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=m.szyprowski@samsung.com \
    --cc=mka@chromium.org \
    --cc=quic_msavaliy@quicinc.com \
    --cc=swboyd@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).