From: sashiko-bot@kernel.org
To: "Jisheng Zhang" <jszhang@kernel.org>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v5 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC
Date: Sat, 05 Dec 2026 15:49:16 +0000 [thread overview]
Message-ID: <sashiko-outbox-251712@kernel.org> (raw)
In-Reply-To: <20261204152836.31432-3-jszhang@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] net: stmmac: dwmac-syna: legacy MDIO fallback bypasses shared
MDIO guard
--
commit 0674470f740697cd1b761fe5d4f86ac719e8f2f7
Author: Jisheng Zhang <jszhang@kernel.org>
net: stmmac: Add glue layer for Synaptics SL2610 SoC
This commit adds the dwmac-syna platform glue driver for the Synaptics
SL2610 SoC, configuring PHY interface selection and shared external MDIO
master routing via syscon.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
> new file mode 100644
> index 0000000000000..b2cb47c0d39e4
> --- /dev/null
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
[ ... ]
> +static int syna_dwmac_claim_mdio(struct syna_dwmac *dwmac)
> +{
> + if (!dwmac->plat->mdio_node ||
> + !of_device_is_available(dwmac->plat->mdio_node))
> + return 0;
> +
> + if (test_and_set_bit(0, &syna_mdio_claimed))
> + return dev_err_probe(dwmac->dev, -EINVAL,
> + "Shared MDIO bus already claimed\n");
> +
> + return devm_add_action_or_reset(dwmac->dev, syna_dwmac_release_mdio, NULL);
> +}
[Severity: Medium]
Can stmmac's legacy MDIO fallback bypass syna_mdio_claimed and the
SYNA_MDIO_MASTER_SEL programming in syna_dwmac_init()?
When a DT node omits mdio, phy-handle, and fixed-link,
stmmac_mdio_setup() allocates plat->mdio_bus_data while leaving
plat->mdio_node as NULL. Both syna_dwmac_claim_mdio() and
syna_dwmac_init() return early on a NULL plat->mdio_node.
stmmac_mdio_register() still registers and scans an MDIO bus whenever
plat->mdio_bus_data is non-NULL, since of_mdiobus_register() falls back to
__mdiobus_register() for a NULL node. If MAC0 takes this path, MAC1 can
later probe with an mdio node and switch SYNA_MDIO_MASTER_SEL away.
Checking plat->mdio_bus_data in both helpers, or clearing it when no
available plat->mdio_node exists, would keep the guard aligned with
stmmac_mdio_register().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204152836.31432-1-jszhang@kernel.org?part=2
next prev parent reply other threads:[~2026-12-05 15:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 15:28 [PATCH net-next v5 0/2] net: stmmac: add SL2610 ethernet support Jisheng Zhang
2026-12-04 15:28 ` [PATCH net-next v5 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC Jisheng Zhang
2026-12-05 16:03 ` netdev-bot+sashiko
2026-12-04 15:28 ` [PATCH net-next v5 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC Jisheng Zhang
2026-12-04 17:16 ` Maxime Chevallier
2026-12-04 19:01 ` Andrew Lunn
2026-12-05 15:49 ` sashiko-bot [this message]
2026-12-05 16:03 ` netdev-bot+sashiko
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-251712@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jszhang@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