From: sashiko-bot@kernel.org
To: "Adrian Hunter" <adrian.hunter@intel.com>
Cc: Frank.Li@kernel.org, linux-i3c@lists.infradead.org
Subject: Re: [PATCH 2/3] i3c: master: Add missing runtime PM get in dev_nack_retry_count_store()
Date: Tue, 16 Jun 2026 11:51:44 +0000 [thread overview]
Message-ID: <20260616115145.0D16B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260616113752.196140-3-adrian.hunter@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Hardware configuration, including the NACK retry count, is lost across runtime suspend/resume cycles.
--
commit c41eb9cead24507098d7a57db0101da0e5c68c34
Author: Adrian Hunter <adrian.hunter@intel.com>
i3c: master: Add missing runtime PM get in dev_nack_retry_count_store()
Ensure the device is runtime resumed while updating the retry
configuration to avoid accessing the controller while suspended.
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index 05ea9e3c4d46f..a24944047e30c 100644
> --- a/drivers/i3c/master.c
> +++ b/drivers/i3c/master.c
[ ... ]
> @@ -767,12 +767,18 @@ static ssize_t dev_nack_retry_count_store(struct device *dev,
> i3c_bus_maintenance_lock(i3cbus);
> ret = master->ops->set_dev_nack_retry(master, val);
> if (!ret)
> master->dev_nack_retry_count = val;
> i3c_bus_maintenance_unlock(i3cbus);
>
> + i3c_master_rpm_put(master);
[Severity: High]
This isn't a bug introduced by this patch, but does putting the device to
sleep here immediately cause the newly written retry count to be lost?
When the dw-i3c-master device enters runtime suspend, the hardware is reset
via reset_control_assert() in dw_i3c_master_runtime_suspend().
Upon resuming, dw_i3c_master_restore_addrs() reads the newly reset hardware
register (which returns 0), updates only the address bits, and writes it
back. This permanently discards other configuration fields, including the
DEV_ADDR_TABLE_DEV_NACK_RETRY_CNT configured here, as well as other fields
like SIR_REJECT and IBI_MDB.
Because dev_nack_retry_count_store() now correctly drops the runtime PM
reference, the controller can suspend immediately after the configuration is
written. Will this silently revert the retry count back to its reset state?
> +
> return ret ?: count;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260616113752.196140-1-adrian.hunter@intel.com?part=2
--
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c
next prev parent reply other threads:[~2026-06-16 11:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 11:37 [PATCH 0/3] i3c: master: Small fixes for dev_nack_retry_count Adrian Hunter
2026-06-16 11:37 ` Adrian Hunter
2026-06-16 11:37 ` [PATCH 1/3] i3c: master: Update dev_nack_retry_count under maintenance lock Adrian Hunter
2026-06-16 11:37 ` Adrian Hunter
2026-06-16 11:51 ` sashiko-bot
2026-06-16 13:30 ` Adrian Hunter
2026-06-16 16:55 ` Frank Li
2026-06-16 16:55 ` Frank Li
2026-06-16 11:37 ` [PATCH 2/3] i3c: master: Add missing runtime PM get in dev_nack_retry_count_store() Adrian Hunter
2026-06-16 11:37 ` Adrian Hunter
2026-06-16 11:51 ` sashiko-bot [this message]
2026-06-16 13:46 ` Adrian Hunter
2026-06-16 16:56 ` Frank Li
2026-06-16 16:56 ` Frank Li
2026-06-16 11:37 ` [PATCH 3/3] i3c: master: Use unsigned int for dev_nack_retry_count consistently Adrian Hunter
2026-06-16 11:37 ` Adrian Hunter
2026-06-16 16:58 ` Frank Li
2026-06-16 16:58 ` Frank Li
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=20260616115145.0D16B1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=linux-i3c@lists.infradead.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.