From: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
To: Thomas Karpiniec <tom.karpiniec@outlook.com>
Cc: netdev@vger.kernel.org,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Russell King <linux@armlinux.org.uk>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Choong Yong Liang <yong.liang.choong@linux.intel.com>,
Bartosz Golaszewski <brgl@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 1/2] net: stmmac: propagate platform mac_finish errors
Date: Wed, 16 Sep 2026 17:33:40 +0530 [thread overview]
Message-ID: <aqqFnJ2EF828xFFb@oss.qualcomm.com> (raw)
In-Reply-To: <CH3PR11MB8413069BD77B03793D1A9B42E4B92@CH3PR11MB8413.namprd11.prod.outlook.com>
On Wed, Sep 16, 2026 at 08:39:49PM +1000, Thomas Karpiniec wrote:
> From: Thomas Karpiniec <tom@wendy.sh>
>
> stmmac_mac_finish() discards the platform callback's return value and
> always reports success to phylink. For example, the Qualcomm ETHQOS
> callback can return an error from phy_set_mode_ext() if SerDes
> configuration fails. Phylink then treats the interface as successfully
> configured and can report carrier even though the SerDes is not ready.
>
> Return the platform callback's result so that phylink can report the
> failure and keep the link down until a subsequent configuration succeeds.
> Keep returning zero when no platform callback is installed.
>
> Fixes: e654cfc718d4 ("net: stmmac: configure SerDes on mac_finish")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM sparse
> Signed-off-by: Thomas Karpiniec <tom@wendy.sh>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 1fb5f804ea23..1350e92943ac 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1048,8 +1048,8 @@ static int stmmac_mac_finish(struct phylink_config *config, unsigned int mode,
> struct stmmac_priv *priv = netdev_priv(ndev);
>
> if (priv->plat->mac_finish)
> - priv->plat->mac_finish(ndev, priv->plat->bsp_priv, mode,
> - interface);
> + return priv->plat->mac_finish(ndev, priv->plat->bsp_priv, mode,
> + interface);
>
> return 0;
> }
Just curious, are you trying to resolve the issue where an interface
gets created depite:
qcom-dwmac-sgmii-phy 8909000.phy: QSERDES_COM_C_READY_STATUS timed-out
qcom-ethqos 23040000.ethernet eth0: __stmmac_open: Serdes powerup failed
in dmesg?
Anyways, the change looks reasonable to me:
Acked-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Ayaan
next prev parent reply other threads:[~2026-09-16 12:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 10:39 [PATCH net 0/2] stmmac: fix ETHQOS SerDes interface handling Thomas Karpiniec
2026-09-16 10:39 ` [PATCH net 1/2] net: stmmac: propagate platform mac_finish errors Thomas Karpiniec
2026-09-16 12:03 ` Mohd Ayaan Anwar [this message]
2026-09-17 4:01 ` Thomas Karpiniec
2026-09-16 13:02 ` Maxime Chevallier
2026-09-16 10:39 ` [PATCH net 2/2] net: stmmac: qcom-ethqos: advertise supported SerDes interfaces Thomas Karpiniec
2026-09-16 12:17 ` Mohd Ayaan Anwar
2026-09-16 12:58 ` Maxime Chevallier
2026-09-17 4:29 ` Thomas Karpiniec
2026-09-17 5:36 ` Maxime Chevallier
2026-09-17 8:21 ` Coia Prant
2026-09-18 4:36 ` Thomas Karpiniec
2026-09-18 5:18 ` Mohd Ayaan Anwar
2026-09-17 15:59 ` Mohd Ayaan Anwar
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=aqqFnJ2EF828xFFb@oss.qualcomm.com \
--to=mohd.anwar@oss.qualcomm.com \
--cc=andrew+netdev@lunn.ch \
--cc=brgl@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tom.karpiniec@outlook.com \
--cc=yong.liang.choong@linux.intel.com \
/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®