From: sashiko-bot@kernel.org
To: "Joshua Crofts" <crofts@kernel.org>
Cc: imx@lists.linux.dev, Frank.Li@kernel.org,
wsa+renesas@sang-engineering.com
Subject: Re: [PATCH 6/6] i2c: xiic: remove redundant pm_runtime_dont_use_autosuspend() calls
Date: Mon, 09 Nov 2026 20:59:33 +0000 [thread overview]
Message-ID: <sashiko-outbox-205622@kernel.org> (raw)
In-Reply-To: <20261109-i2c-remove-dont-use-autosuspend-v1-6-49a08b8daf36@kernel.org>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] i2c: xiic: premature IRQ registration in xiic_i2c_probe() [1]
--
commit 188337d85ab0ac1fad4560f785b36f1dce4f451f
Author: Joshua Crofts <crofts@kernel.org>
i2c: xiic: remove redundant pm_runtime_dont_use_autosuspend() calls
This commit removes redundant pm_runtime_dont_use_autosuspend() calls from
the probe error path and remove callback in the xiic I2C driver.
> diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
> index ab7916745ad39..4e06fa4f73d77 100644
> --- a/drivers/i2c/busses/i2c-xiic.c
> +++ b/drivers/i2c/busses/i2c-xiic.c
> @@ -1580,7 +1580,6 @@ static int xiic_i2c_probe(struct platform_device *pdev)
> err_pm_disable:
> pm_runtime_disable(dev);
> pm_runtime_set_suspended(dev);
> - pm_runtime_dont_use_autosuspend(dev);
>
> return ret;
> }
[Severity: High]
This problem wasn't introduced by this patch, but can registering the IRQ
in xiic_i2c_probe() before detecting hardware endianness cause an
interrupt storm [1]?
drivers/i2c/busses/i2c-xiic.c:xiic_i2c_probe() {
...
ret = request_threaded_irq(irq, NULL, xiic_process, IRQF_ONESHOT,
pdev->name, i2c);
if (ret)
goto err_pm_disable;
i2c->singlemaster = device_property_read_bool(dev, "single-master");
/*
* Detect endianness
* Try to reset the TX FIFO. Then check the EMPTY flag. If it is not
* set, assume that the endianness was wrong and swap.
*/
i2c->endianness = LITTLE;
xiic_setreg32(i2c, XIIC_CR_REG_OFFSET, XIIC_CR_TX_FIFO_RESET_MASK);
/* Reset is cleared in xiic_reinit */
sr = xiic_getreg32(i2c, XIIC_SR_REG_OFFSET);
if (!(sr & XIIC_SR_TX_FIFO_EMPTY_MASK))
i2c->endianness = BIG;
...
}
If a pending interrupt remains from an earlier boot stage on a big-endian
system, xiic_process() can fire immediately after request_threaded_irq()
while i2c->endianness is still zero-initialized to LITTLE. xiic_getreg32()
and xiic_setreg32() then use little-endian accessors, failing to clear the
interrupt and hanging the system in an unhandled IRQ storm. Detecting
endianness and running xiic_reinit() before requesting the IRQ would avoid
this.
[1] https://sashiko.dev/#/bug/linux-6466439c-c62b-471e-ba38-0219e368df95
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261109-i2c-remove-dont-use-autosuspend-v1-0-49a08b8daf36@kernel.org?part=6
prev parent reply other threads:[~2026-11-09 20:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 20:50 [PATCH 0/6] i2c: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
2026-11-09 20:50 ` [PATCH 1/6] i2c: cadence: remove redundant pm_runtime_dont_use_autosuspend() call Joshua Crofts
2026-11-09 20:50 ` [PATCH 2/6] i2c: img-scb: " Joshua Crofts
2026-11-09 20:50 ` [PATCH 3/6] i2c: imx: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
2026-11-12 3:33 ` Frank Li
2026-11-09 20:50 ` [PATCH 4/6] i2c: riic: " Joshua Crofts
2026-11-10 7:57 ` Geert Uytterhoeven
2026-11-09 20:50 ` [PATCH 5/6] i2c: stm32f7: " Joshua Crofts
2026-11-09 20:50 ` [PATCH 6/6] i2c: xiic: " Joshua Crofts
2026-11-09 20:59 ` sashiko-bot [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=sashiko-outbox-205622@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=crofts@kernel.org \
--cc=imx@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
--cc=wsa+renesas@sang-engineering.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.