From: sashiko-bot@kernel.org
To: "Yicong Yang" <yang.yicong@picoheart.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v2] serial: 8250_dw: Prefer SRBR in bogus RX timeout workaround if available
Date: Mon, 07 Sep 2026 07:49:56 +0000 [thread overview]
Message-ID: <20260907074957.16C411F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260907074035.77796-1-yang.yicong@picoheart.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Runtime PM is enabled after UART port registration, causing circular dependencies and hung threads.
--
commit eaccc720cb53d60702a5d31bbe2439896bdfd1ce
Author: Yicong Yang <yang.yicong@picoheart.com>
serial: 8250_dw: Prefer SRBR in bogus RX timeout workaround if available
The DW uart can get into a state where a bogus RX timeout interrupt is
asserted without available data. The driver currently works around this by
doing a bogus read from the standard RBR, but this can cause hardware errors
on some platforms. This commit changes the driver to prefer reading from the
Shadow RBR (SRBR) if available, avoiding the error.
Link: https://lore.kernel.org/linux-serial/20260629075510.32854-1-yang.yicong@picoheart.com/
> diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
> index 51d026f20825a..b8a0bca8b536f 100644
> --- a/drivers/tty/serial/8250/8250_dw.c
> +++ b/drivers/tty/serial/8250/8250_dw.c
[ ... ]
[Severity: High]
This is a pre-existing issue, but I noticed a potential circular dependency in
the device probe sequence:
drivers/tty/serial/8250/8250_dw.c:dw8250_probe() {
...
data->data.line = serial8250_register_8250_port(up);
if (data->data.line < 0)
return data->data.line;
platform_set_drvdata(pdev, data);
pm_runtime_enable(dev);
...
}
Does this ordering cause hung worker threads during device probe?
Calling serial8250_register_8250_port() invokes uart_add_one_port(), which
synchronously calls the pm() callback (dw8250_do_pm()) via uart_change_pm().
If the callback calls pm_runtime_get_sync() before runtime PM is enabled on
the device, the core will attempt operations on an uninitialized device,
leading to circular wait conditions.
Should pm_runtime_enable() be called before serial8250_register_8250_port()
to prevent this?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260907074035.77796-1-yang.yicong@picoheart.com?part=1
next prev parent reply other threads:[~2026-09-07 7:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 7:40 [PATCH v2] serial: 8250_dw: Prefer SRBR in bogus RX timeout workaround if available Yicong Yang
2026-09-07 7:49 ` sashiko-bot [this message]
2026-09-08 10:25 ` Andy Shevchenko
2026-09-08 11:52 ` Yicong Yang
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=20260907074957.16C411F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=yang.yicong@picoheart.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 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.