From: sashiko-bot@kernel.org
To: "Maxime Chevallier" <maxime.chevallier@bootlin.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next 03/12] net: phy: Don't create the sysfs links for PHYs behind a mux
Date: Sat, 05 Dec 2026 11:08:47 +0000 [thread overview]
Message-ID: <sashiko-outbox-251444@kernel.org> (raw)
In-Reply-To: <20261204110622.1106492-4-maxime.chevallier@bootlin.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] net: phy: skipping phy_sysfs_create_links() drops per-PHY
attached_dev link
--
commit a16b08e2d216e5687da38893c4bd94d7b180213f
Author: Maxime Chevallier <maxime.chevallier@bootlin.com>
net: phy: Don't create the sysfs links for PHYs behind a mux
This commit adds a mux_port pointer to struct phy_device and skips calling
phy_sysfs_create_links() in phy_attach_direct() when phydev->mux_port is set.
> diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> index 60440b62e6c79..9630578a6a5c5 100644
> --- a/drivers/net/phy/phy_device.c
> +++ b/drivers/net/phy/phy_device.c
> @@ -2019,7 +2019,8 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
> */
> phydev->sysfs_links = false;
>
> - phy_sysfs_create_links(phydev);
> + if (!phydev->mux_port)
> + phy_sysfs_create_links(phydev);
>
> if (!phydev->attached_dev) {
> err = sysfs_create_file(&phydev->mdio.dev.kobj,
[Severity: Low]
Should muxed PHYs still create the per-PHY attached_dev symlink?
phy_sysfs_create_links() creates two symlinks: attached_dev under
phydev->mdio.dev.kobj and phydev under dev->dev.kobj. Only the netdev-side
phydev link collides across multiple PHYs (failing with -EEXIST rather than
overwriting), whereas each PHY has its own kobject for attached_dev.
Skipping phy_sysfs_create_links() entirely while phydev->attached_dev is
still set leaves muxed PHYs with neither attached_dev nor phy_standalone in
sysfs, despite Documentation/ABI/testing/sysfs-class-net-phydev documenting
attached_dev for attached PHYs.
If omitting attached_dev is intentional, the commit message and ABI doc
should note that; otherwise, only the netdev-side phydev link needs to be
skipped (with phy_detach_internal() updated to match).
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204110622.1106492-1-maxime.chevallier@bootlin.com?part=3
next prev parent reply other threads:[~2026-12-05 11:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 11:06 [PATCH net-next 00/12] net: phy: Introduce MII multiplexers Maxime Chevallier
2026-12-04 11:06 ` [PATCH net-next 01/12] dt-bindings: net: Add Ethernet " Maxime Chevallier
2026-12-05 11:08 ` sashiko-bot
2026-12-04 11:06 ` [PATCH net-next 02/12] net: phy: Introduce phy_mux, a MII multiplexer representation Maxime Chevallier
2026-12-04 11:06 ` [PATCH net-next 03/12] net: phy: Don't create the sysfs links for PHYs behind a mux Maxime Chevallier
2026-12-05 11:08 ` sashiko-bot [this message]
2026-12-04 11:06 ` [PATCH net-next 04/12] net: phy: phy_mux: Allow attaching a mux to a net_device Maxime Chevallier
2026-12-05 11:08 ` sashiko-bot
2026-12-04 11:06 ` [PATCH net-next 05/12] net: phy: phy_mux: Add port selection logic Maxime Chevallier
2026-12-05 11:08 ` sashiko-bot
2026-12-04 11:06 ` [PATCH net-next 06/12] net: phy: phy_mux: Support SFP cage ports Maxime Chevallier
2026-12-05 11:08 ` sashiko-bot
2026-12-04 11:06 ` [PATCH net-next 07/12] net: phylink: Factor out phylink_clear_phydev() Maxime Chevallier
2026-12-04 11:06 ` [PATCH net-next 08/12] net: phy: phy_mux: Add phy_mux_set_mac_managed_pm() Maxime Chevallier
2026-12-04 11:06 ` [PATCH net-next 09/12] net: phylink: Support PHYs reached through a phy_mux Maxime Chevallier
2026-12-05 11:08 ` sashiko-bot
2026-12-04 11:06 ` [PATCH net-next 10/12] net: phylink: Support an SFP cage behind " Maxime Chevallier
2026-12-05 11:08 ` sashiko-bot
2026-12-04 11:06 ` [PATCH net-next 11/12] net: phy: mux: Add the mii-mux-auto driver Maxime Chevallier
2026-12-05 11:08 ` sashiko-bot
2026-12-04 11:06 ` [PATCH net-next 12/12] ARM: dts: turris-omnia: Describe the WAN port multiplexer Maxime Chevallier
2026-12-05 11:08 ` sashiko-bot
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-251444@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--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