From: netdev-bot+sashiko@kernel.org
To: markus.stockhausen@gmx.de
Cc: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org,
chris.packham@alliedtelesis.co.nz, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v4 4/5] net: mdio: realtek-rtl9300: reject duplicate MDIO bus IDs
Date: Wed, 16 Sep 2026 13:35:13 +0000 [thread overview]
Message-ID: <178956571358.22033.5636304813155390985@kernel.org> (raw)
In-Reply-To: <20260912130451.3757276-5-markus.stockhausen@gmx.de>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider:
Critical: 0 · High: 0 · Medium: 0 · Low: 1
- [Low] Claimed DT-binding-vs-driver mismatch: the series patch "dt-
bindings: net: realtek,rtl9301-mdio: add clock-frequency" documents a…
--
net: mdio: realtek-rtl9300: reject duplicate MDIO bus IDs
The patch makes otto_emdio_probe_one() reject a second mdio-bus child node
that reuses an already registered reg value, instead of relying on the later
failure inside MDIO bus registration. The previously unused priv->bus[] array
is now filled in after a successful registration and used as the duplicate
check.
> diff --git a/drivers/net/mdio/mdio-realtek-rtl9300.c b/drivers/net/mdio/mdio-realtek-rtl9300.c
> index 8ca917d9aea3c..45cbefc52100a 100644
> --- a/drivers/net/mdio/mdio-realtek-rtl9300.c
> +++ b/drivers/net/mdio/mdio-realtek-rtl9300.c
[ ... ]
> @@ -868,6 +871,8 @@ static int otto_emdio_probe_one(struct device *dev, struct otto_emdio_priv *priv
> if (err)
> return dev_err_probe(dev, err, "cannot register MDIO bus\n");
>
> + priv->bus[mdio_bus] = bus;
> +
> return 0;
> }
[Severity: Low]
This is only an ordering observation about the series, not a bug in this
patch.
At this point in the series, the earlier binding patch "dt-bindings: net:
realtek,rtl9301-mdio: add clock-frequency" already documents a per-bus
clock-frequency property (2.5/10 MHz for RTL838x, 1.25/2.5/5 MHz for
RTL839x/930x/931x, plus the RTL839x shared-selector rule), while
otto_emdio_probe_one() still reads only the reg property, so a device tree
setting clock-frequency would be silently ignored on these commits.
The gap closes at the end of the series in "net: mdio: realtek-rtl9300:
support non-default clock frequencies", which adds the consumer in
otto_emdio_probe_one():
if (of_property_read_u32(node, "clock-frequency", &freq))
freq = 2500000;
err = priv->info->set_bus_frequency(bus, freq);
and otto_emdio_8390_set_bus_frequency() relies on exactly the priv->bus[]
bookkeeping added here to program the shared RTL839x selector only once:
if (priv->bus[0] || priv->bus[1])
return 0;
Would it be worth mentioning that dependency, or moving the binding patch
next to the driver patch that consumes the property, so that no intermediate
commit documents a property the driver ignores?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260912130451.3757276-1-markus.stockhausen%40gmx.de
next prev parent reply other threads:[~2026-09-16 13:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-12 13:04 [PATCH net-next v4 0/5] net: mdio: realtek-rtl9300: add bus frequency handling Markus Stockhausen
2026-09-12 13:04 ` [PATCH net-next v4 1/5] dt-bindings: net: realtek,rtl9301-mdio: restrict MDIO buses by family Markus Stockhausen
2026-09-16 13:35 ` netdev-bot+sashiko
2026-09-24 14:46 ` Rob Herring
2026-09-12 13:04 ` [PATCH net-next v4 2/5] dt-bindings: net: realtek,rtl9301-mdio: add clock-frequency Markus Stockhausen
2026-09-16 13:35 ` netdev-bot+sashiko
2026-09-24 14:43 ` Rob Herring
2026-09-12 13:04 ` [PATCH net-next v4 3/5] net: mdio: realtek-rtl9300: convert "fwnode" left-overs to "of" Markus Stockhausen
2026-09-14 16:30 ` Andrew Lunn
2026-09-12 13:04 ` [PATCH net-next v4 4/5] net: mdio: realtek-rtl9300: reject duplicate MDIO bus IDs Markus Stockhausen
2026-09-14 16:31 ` Andrew Lunn
2026-09-14 16:44 ` Andrew Lunn
2026-09-16 13:35 ` netdev-bot+sashiko [this message]
2026-09-12 13:04 ` [PATCH net-next v4 5/5] net: mdio: realtek-rtl9300: support non-default clock frequencies Markus Stockhausen
2026-09-14 16:47 ` Andrew Lunn
2026-09-16 13:35 ` 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=178956571358.22033.5636304813155390985@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew@lunn.ch \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=markus.stockhausen@gmx.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@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