From: Jiri Slaby <jirislaby@kernel.org>
To: "Praveen Talari" <praveen.talari@oss.qualcomm.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Richard Genoud" <richard.genoud@bootlin.com>,
"Nicolas Ferre" <nicolas.ferre@microchip.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Peter Griffin" <peter.griffin@linaro.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Orson Zhai" <orsonzhai@gmail.com>,
"Baolin Wang" <baolin.wang@linux.alibaba.com>,
"Chunyan Zhang" <zhang.lyra@gmail.com>,
"Patrice Chotard" <patrice.chotard@foss.st.com>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Peter Korsgaard" <jacmet@sunsite.dk>,
"Michal Simek" <michal.simek@amd.com>,
"Aaro Koskinen" <aaro.koskinen@iki.fi>,
"Janusz Krzysztofik" <jmkrzyszt@gmail.com>,
"Tony Lindgren" <tony@atomide.com>,
"Russell King" <linux@armlinux.org.uk>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
bjorn.andersson@oss.qualcomm.com,
"Konrad Dybcio" <konrad.dybcio@oss.qualcomm.com>
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
linux-arm-msm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-omap@vger.kernel.org, linux-mips@vger.kernel.org,
Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>,
aniket.randive@oss.qualcomm.com,
chandana.chiluveru@oss.qualcomm.com
Subject: Re: [PATCH 0/6] tty: serial: propagate errors from uart_ops.pm callback
Date: Thu, 9 Jul 2026 08:53:54 +0200 [thread overview]
Message-ID: <9320a573-ebf8-459b-a313-3a8b73a6180b@kernel.org> (raw)
In-Reply-To: <20260709-add_return_check_for_uart_change_pm-v1-0-e85c6ffa8ec4@oss.qualcomm.com>
On 09. 07. 26, 8:25, Praveen Talari wrote:
> The uart_ops.pm callback has been declared void since its introduction,
> which means any error from a driver's power management implementation is
> silently discarded by uart_change_pm(). Beyond losing the error
> information, uart_change_pm() unconditionally updates state->pm_state
> even when the underlying hardware transition failed. This causes the
> serial core to track a power state that does not reflect reality:
> subsequent calls to uart_change_pm() see the stale cached state as
> matching the requested state and skip the callback entirely, leaving the
> hardware permanently stuck with no further recovery attempt.
>
> On modern platforms where the .pm callback performs real work —
> enabling clock trees, interacting with runtime PM, asserting voltage
> regulators — this is a correctness gap. Failures are invisible to the
> PM framework, the port proceeds to call ops->startup() on potentially
> unpowered hardware, and suspend/resume errors are hidden from the core
> that needs to handle them.
>
> This series fixes the problem in four steps:
>
> Patch 1 changes the uart_ops.pm callback signature from void to int,
> updates uart_change_pm() to propagate errors and only commit
> state->pm_state on success, and handles the return value at every
> call site in serial_core.c with appropriate policy per context
> (propagate, log, or skip-on-failure).
So does this break build without the below applied? IOW: breaks
bisectability?
> Patch 2 updates the 8250 driver family: serial8250_do_pm() and
> serial8250_pm() are updated to return int (with the exported symbol
> declaration updated in serial_8250.h), and the 8250 sub-driver
> pm callbacks are updated to return 0.
>
> Patch 3 updates the remaining non-8250 serial drivers. All .pm
> implementations are updated to return 0. The sh-sci forward
> declaration shared with rsci is also updated.
>
> Patch 4 updates arch-level implementations: SA1100 (assabet, h3xxx),
> OMAP1/ams-delta (modem_pm, now propagates regulator errors), and
> MIPS/Alchemy (alchemy_8250_pm).
>
> All existing .pm implementations return 0, so there is no functional
> change for any current driver. The series purely adds the infrastructure
> for drivers to report errors going forward, with the serial core ready
> to handle them correctly.
OK, now I miss the rationale behind the patchset. Neither there is a
possible code path to actually test this?
thanks,
--
js
suse labs
next prev parent reply other threads:[~2026-07-09 6:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 6:25 [PATCH 0/6] tty: serial: propagate errors from uart_ops.pm callback Praveen Talari
2026-07-09 6:25 ` [PATCH 1/6] tty: serial: change uart_ops.pm callback to return int Praveen Talari
2026-07-09 6:25 ` [PATCH 2/6] serial: 8250: update .pm callbacks " Praveen Talari
2026-07-09 6:25 ` [PATCH 3/6] tty: serial: " Praveen Talari
2026-07-09 6:25 ` [PATCH 4/6] arch: update uart pm " Praveen Talari
2026-07-09 6:25 ` [PATCH 5/6] tty: serial: propagate uart_configure_port failure to uart_add_one_port Praveen Talari
2026-07-09 6:25 ` [PATCH 6/6] serial: qcom-geni: check return value of pm_runtime_resume_and_get() Praveen Talari
2026-07-09 6:53 ` Jiri Slaby [this message]
2026-07-09 8:52 ` [PATCH 0/6] tty: serial: propagate errors from uart_ops.pm callback Praveen Talari
2026-07-09 10:16 ` Andy Shevchenko
2026-07-09 12:45 ` Praveen Talari
2026-07-09 7:31 ` Andy Shevchenko
2026-07-10 4:37 ` Tony Lindgren
2026-07-13 9:29 ` Tony Lindgren
2026-07-13 11:21 ` Andy Shevchenko
2026-07-14 5:25 ` Tony Lindgren
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=9320a573-ebf8-459b-a313-3a8b73a6180b@kernel.org \
--to=jirislaby@kernel.org \
--cc=aaro.koskinen@iki.fi \
--cc=alexandre.belloni@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=alim.akhtar@samsung.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=aniket.randive@oss.qualcomm.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=bjorn.andersson@oss.qualcomm.com \
--cc=chandana.chiluveru@oss.qualcomm.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jacmet@sunsite.dk \
--cc=jmkrzyszt@gmail.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux@armlinux.org.uk \
--cc=matthias.bgg@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=michal.simek@amd.com \
--cc=mukesh.savaliya@oss.qualcomm.com \
--cc=nicolas.ferre@microchip.com \
--cc=orsonzhai@gmail.com \
--cc=patrice.chotard@foss.st.com \
--cc=peter.griffin@linaro.org \
--cc=praveen.talari@oss.qualcomm.com \
--cc=richard.genoud@bootlin.com \
--cc=tony@atomide.com \
--cc=tsbogend@alpha.franken.de \
--cc=zhang.lyra@gmail.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.