From: sashiko-bot@kernel.org
To: "Sebastian Reichel" <sebastian.reichel@collabora.com>
Cc: linux-phy@lists.infradead.org, neil.armstrong@linaro.org,
olteanv@gmail.com, vkoul@kernel.org
Subject: Re: [PATCH] phy: rockchip: inno-usb2: ensure PHY is running when clock is requested
Date: Tue, 08 Sep 2026 16:20:12 +0000 [thread overview]
Message-ID: <20260908162013.61DD61F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908-phy-rockchip-inno-usb2-clock-fix-v1-1-f7d59c31b908@collabora.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing .remove callback leaves delayed works pending after driver unbind.
--
commit bf4a39e5deb580ca9fd1ce23137a41fc39aa2be7
Author: Sebastian Reichel <sebastian.reichel@collabora.com>
phy: rockchip: inno-usb2: ensure PHY is running when clock is requested
This commit resumes the suspended PHY in the clock's prepare function.
By doing so, it ensures the PHY's 480MHz clock is running when requested
by the OHCI controller on RK3588, which prevents a board hang after
system suspend.
> diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> index 7d8a533f24aea..07d400967def6 100644
> --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
[ ... ]
[Severity: High]
This isn't a bug introduced by this patch, but it is a pre-existing
issue. Does the lack of a .remove callback leave delayed works pending
after the driver unbinds?
Looking at rockchip_usb2phy_driver, it does not define a .remove callback:
drivers/phy/rockchip/phy-rockchip-inno-usb2.c:rockchip_usb2phy_driver {
static struct platform_driver rockchip_usb2phy_driver = {
.probe = rockchip_usb2phy_probe,
.driver = {
.name = "rockchip-usb2phy",
.of_match_table = rockchip_usb2phy_dt_match,
},
};
}
And the delayed work sm_work reschedules itself:
drivers/phy/rockchip/phy-rockchip-inno-usb2.c:rockchip_usb2phy_sm_work() {
[ ... ]
next_schedule:
mutex_unlock(&rport->mutex);
schedule_delayed_work(&rport->sm_work, SCHEDULE_DELAY);
}
If the driver is unbound while delayed works like sm_work are scheduled,
devres will immediately free the driver's memory. Because the driver lacks
a .remove callback to synchronously cancel the work, will the delayed works
access freed memory when they execute?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908-phy-rockchip-inno-usb2-clock-fix-v1-1-f7d59c31b908@collabora.com?part=1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2026-09-08 16:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 16:07 [PATCH] phy: rockchip: inno-usb2: ensure PHY is running when clock is requested Sebastian Reichel
2026-09-08 16:20 ` sashiko-bot [this message]
2026-09-08 16:29 ` Igor Paunovic
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=20260908162013.61DD61F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sebastian.reichel@collabora.com \
--cc=vkoul@kernel.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