From: sashiko-bot@kernel.org
To: "Coia Prant" <coiaprant@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v12 3/6] net: pcs: xpcs: add Rockchip RK3568 platform glue driver
Date: Sun, 18 Oct 2026 05:45:38 +0000 [thread overview]
Message-ID: <sashiko-outbox-175952@kernel.org> (raw)
In-Reply-To: <20261017054406.1828061-4-coiaprant@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] net: pcs: xpcs: xpcs_rk_system_suspend() relies on unset active_wakeup
--
commit 51040950622ac8bc620e18e37d9000b98191388d
Author: Coia Prant <coiaprant@gmail.com>
net: pcs: xpcs: add Rockchip RK3568 platform glue driver
This commit adds a platform glue driver for the Synopsys DesignWare XPCS
on Rockchip RK3568 SoCs, creating a virtual MDIO bus over APB3 registers
and managing the SerDes PHY, clocks, and power domain.
Link: https://dl.radxa.com/rock3/docs/hw/datasheet/Rockchip%20RK3568%20TRM%20Part1%20V1.1-20210301.pdf (Page 59, CRU_CLKSEL_CON29)
Link: https://dl.radxa.com/rock3/docs/hw/datasheet/Rockchip%20RK3568%20TRM%20Part2%20V1.1-20210301.pdf (Page 2078)
> diff --git a/drivers/net/pcs/pcs-xpcs-rk.c b/drivers/net/pcs/pcs-xpcs-rk.c
> new file mode 100644
> index 0000000000000..698a43b753341
> --- /dev/null
> +++ b/drivers/net/pcs/pcs-xpcs-rk.c
> @@ -0,0 +1,598 @@
[ ... ]
> +static int xpcs_rk_system_suspend(struct device *dev)
> +{
> + /*
> + * Keep the PD_PIPE power domain on during system suspend.
> + *
> + * PD_PIPE is shared with SATA/PCIe and would be powered down by
> + * genpd once all its consumers are suspended, killing the SerDes
> + * and breaking MAC WoL. Mark the XPCS as part of the wakeup path
> + * so genpd keeps the domain on. Unconditional because the XPCS
> + * core has no callback to convey the MAC WoL state.
> + */
> + device_set_wakeup_path(dev);
> + return 0;
> +}
> +
> +static int xpcs_rk_system_resume(struct device *dev)
> +{
> + return 0;
> +}
[Severity: Medium]
Does calling device_set_wakeup_path(dev) in xpcs_rk_system_suspend()
actually keep the RK3568_PD_PIPE power domain powered on during system
suspend?
The commit message notes that genpd leaves the domain powered because the
Rockchip power domain driver sets GENPD_FLAG_ACTIVE_WAKEUP on PD_PIPE.
However, in drivers/pmdomain/rockchip/pm-domains.c, rk3568_pm_domains
defines RK3568_PD_PIPE with wakeup set to false:
drivers/pmdomain/rockchip/pm-domains.c:
[RK3568_PD_PIPE] = DOMAIN_RK3568("pipe", BIT(8), BIT(11), false, false),
In rockchip_pm_add_one_domain(), GENPD_FLAG_ACTIVE_WAKEUP is only set when
pd_info->active_wakeup is true:
pd->genpd.flags = GENPD_FLAG_PM_CLK | GENPD_FLAG_NO_STAY_ON;
if (pd_info->active_wakeup)
pd->genpd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
When the system suspends via genpd_suspend_noirq() -> genpd_finish_suspend()
in drivers/pmdomain/core.c, genpd checks:
if (device_awake_path(dev) && genpd_is_active_wakeup(genpd) &&
!device_out_band_wakeup(dev))
return 0;
Because genpd_is_active_wakeup(genpd) is false for RK3568_PD_PIPE, genpd
ignores device_awake_path(dev) and powers off the domain once all consumers
are suspended. This powers down the shared SerDes PHY and XPCS controller,
breaking MAC Wake-on-LAN and losing hardware state across suspend and
resume since xpcs_rk_system_resume() is a no-op.
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261017054406.1828061-1-coiaprant@gmail.com?part=3
next prev parent reply other threads:[~2026-10-18 5:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-17 5:43 [PATCH net-next v12 0/6] net: pcs: add basic support for RK3568 XPCS Coia Prant
2026-10-17 5:43 ` [PATCH net-next v12 1/6] net: pcs: xpcs: add ANRESTART support for SGMII link recovery Coia Prant
2026-10-18 6:45 ` netdev-bot+sashiko
2026-10-17 5:44 ` [PATCH net-next v12 2/6] dt-bindings: net: pcs: add rockchip,rk3568-xpcs support Coia Prant
2026-10-18 6:45 ` netdev-bot+sashiko
2026-10-17 5:44 ` [PATCH net-next v12 3/6] net: pcs: xpcs: add Rockchip RK3568 platform glue driver Coia Prant
2026-10-18 5:45 ` sashiko-bot [this message]
2026-10-18 6:45 ` netdev-bot+sashiko
2026-10-17 5:44 ` [PATCH net-next v12 4/6] dt-bindings: net: rockchip-dwmac: document pcs-handle Coia Prant
2026-10-18 6:45 ` netdev-bot+sashiko
2026-10-17 5:44 ` [PATCH net-next v12 5/6] net: stmmac: dwmac-rk: add SGMII support for RK3568 Coia Prant
2026-10-18 6:45 ` netdev-bot+sashiko
2026-10-17 5:44 ` [PATCH net-next v12 6/6] MAINTAINERS: add entry for Rockchip XPCS driver Coia Prant
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-175952@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=coiaprant@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox