From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: netdev-bot+sashiko@kernel.org, aiyengar1990@gmail.com
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com,
alexandre.torgue@foss.st.com, wens@kernel.org,
jernej.skrabec@gmail.com, samuel@sholland.org,
clabbe.montjoie@gmail.com, netdev@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: stmmac: dwmac-sun8i: Defer probe when the EPHY clock is not ready
Date: Tue, 17 Nov 2026 10:35:23 +0100 [thread overview]
Message-ID: <7b9a4fe1-a885-4ace-bad0-b819ac8b11b4@bootlin.com> (raw)
In-Reply-To: <179490321548.3136.12535368591168637116@kernel.org>
Hi,
On 11/17/26 09:13, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue(s) to consider.
>
> Critical: 0 · High: 1 · Medium: 0 · Low: 0
>
> If you believe none of the issues are legitimate, please reply to each
> issue of Medium severity or higher and explain why the AI is wrong.
> If any of them are legitimate and you plan to respin, please let patchwork
> know by including "pw-bot: cr" as a separate line at the end of your reply
> (one such reply per series is enough).
>
> - [High] The patch makes get_ephy_nodes() in
> drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c return -EPROBE_DEFER…
>
> --
>
> net: stmmac: dwmac-sun8i: Defer probe when the EPHY clock is not ready
>
> With this patch, get_ephy_nodes() returns -EPROBE_DEFER when of_clk_get()
> on the internal PHY node returns -EPROBE_DEFER. Before, it skipped the
> node and the probe ended with -ENODEV. Other clock errors still skip the
> node.
>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
>> index 2ece7ba9dd73b..8163e49fa7ad0 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
>> @@ -801,8 +801,13 @@ static int get_ephy_nodes(struct stmmac_priv *priv)
>> struct clk *ephy_clk;
>>
>> ephy_clk = of_clk_get(iphynode, 0);
>> - if (IS_ERR(ephy_clk))
>> + if (IS_ERR(ephy_clk)) {
>> + if (PTR_ERR(ephy_clk) == -EPROBE_DEFER) {
>> + of_node_put(mdio_internal);
>> + return -EPROBE_DEFER;
>> + }
>> continue;
>> + }
>> gmac->rst_ephy = of_reset_control_get_exclusive(iphynode, NULL);
>> if (IS_ERR(gmac->rst_ephy)) {
>> ret = PTR_ERR(gmac->rst_ephy);
>
> [Severity: High]
> Does this deferral come too late in the probe?
I agree with the bot here, this defer happens after the netdev is registered,
which isn't great... And it's likely the PHY is on that mux'd bus, no ?
Was this tested ? Doesn't it really work to return a probedefer so late ?
This mdio mux logic should likely be reworked so that we register the mux in due
time (i.e during the mdio init sequence, may be by hooking into stmmac_mdio_setup
or something like that ?)
Maxime
prev parent reply other threads:[~2026-11-17 9:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 8:04 Arun Iyengar via B4 Relay
2026-11-17 8:13 ` netdev-bot+sashiko
2026-11-17 9:35 ` Maxime Chevallier [this message]
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=7b9a4fe1-a885-4ace-bad0-b819ac8b11b4@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=aiyengar1990@gmail.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=clabbe.montjoie@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=jernej.skrabec@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=samuel@sholland.org \
--cc=wens@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
all inboxes | Powered by JetHome®