From: sashiko-bot@kernel.org
To: "Jacky Chou" <jacky_chou@aspeedtech.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v2 4/6] net: ftgmac100: Require phy-mode for AST2700
Date: Wed, 07 Oct 2026 07:21:09 +0000 [thread overview]
Message-ID: <sashiko-outbox-162704@kernel.org> (raw)
In-Reply-To: <20261006-support_ast2700-v2-4-36de51fb8066@aspeedtech.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] net: unreachable phy-mode validation for AST2700 due to NULL mii_bus
--
commit 73c3274c3dceb52c26bd7913efb395eafee8af8d
Author: Jacky Chou <jacky_chou@aspeedtech.com>
net: ftgmac100: Require phy-mode for AST2700
This commit modifies the PHY interface initialization for the AST2700 SoC.
It mandates the presence of the "phy-mode" device tree property and will
fail probing if it is missing, instead of silently defaulting to RGMII.
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
> index b835472da3604..2d029d1262e6f 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.c
> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
> @@ -1521,8 +1521,13 @@ static int ftgmac100_mii_probe(struct net_device *netdev)
>
> /* Default to RGMII. It's a gigabit part after all */
> err = of_get_phy_mode(np, &phy_intf);
> - if (err)
> + if (err) {
> + if (priv->mac_id == FTGMAC100_AST2700) {
> + dev_err(priv->dev, "phy-mode is required for this SoC\n");
> + return -EINVAL;
> + }
[Severity: Medium]
Is this new AST2700 check unreachable in practice?
A few lines earlier in ftgmac100_mii_probe(), the function unconditionally
returns -ENODEV if priv->mii_bus is NULL:
if (!priv->mii_bus) {
dev_err(priv->dev, "No MDIO bus available\n");
return -ENODEV;
}
Looking at ftgmac100_probe(), the driver skips calling ftgmac100_setup_mdio()
for the AST2700:
if (priv->mac_id == FTGMAC100_FARADAY ||
priv->mac_id == FTGMAC100_AST2400 ||
priv->mac_id == FTGMAC100_AST2500) {
err = ftgmac100_setup_mdio(netdev);
if (err)
return err;
}
Because ftgmac100_setup_mdio() is skipped, does priv->mii_bus remain NULL for
the AST2700, causing ftgmac100_mii_probe() to always return -ENODEV before
ever reaching the newly added phy-mode validation logic?
> phy_intf = PHY_INTERFACE_MODE_RGMII;
> + }
>
> /* Aspeed only supports these. I don't know about other IP
> * block vendors so I'm going to just let them through for
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261006-support_ast2700-v2-0-36de51fb8066@aspeedtech.com?part=4
next prev parent reply other threads:[~2026-10-07 7:21 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 7:20 [PATCH net-next v2 0/6] net: ftgmac100: Add AST2700 support Jacky Chou
2026-10-06 7:20 ` [PATCH net-next v2 1/6] dt-bindings: net: ftgmac100: Add AST2700 compatible Jacky Chou
2026-10-07 7:21 ` sashiko-bot
2026-10-10 7:58 ` netdev-bot+sashiko
2026-10-12 18:17 ` Conor Dooley
2026-10-13 5:23 ` 回覆: " Jacky Chou
2026-10-13 16:22 ` Conor Dooley
2026-10-06 7:20 ` [PATCH net-next v2 2/6] net: ftgmac100: Add AST2700 compatible support Jacky Chou
2026-10-06 16:22 ` Andrew Lunn
2026-10-10 7:58 ` netdev-bot+sashiko
2026-10-06 7:20 ` [PATCH net-next v2 3/6] net: ftgmac100: Enable AST2700 RMII support Jacky Chou
2026-10-06 16:31 ` Andrew Lunn
2026-10-08 5:39 ` 回覆: " Jacky Chou
2026-10-08 12:00 ` Andrew Lunn
2026-10-08 12:10 ` 回覆: " Jacky Chou
2026-10-07 7:21 ` sashiko-bot
2026-10-10 7:58 ` netdev-bot+sashiko
2026-10-06 7:20 ` [PATCH net-next v2 4/6] net: ftgmac100: Require phy-mode for AST2700 Jacky Chou
2026-10-06 16:21 ` Andrew Lunn
2026-10-08 5:20 ` 回覆: " Jacky Chou
2026-10-07 7:21 ` sashiko-bot [this message]
2026-10-10 7:58 ` netdev-bot+sashiko
2026-10-06 7:20 ` [PATCH net-next v2 5/6] net: ftgmac100: Add AST2700 upper DMA address support Jacky Chou
2026-10-10 7:58 ` netdev-bot+sashiko
2026-10-06 7:20 ` [PATCH net-next v2 6/6] net: ftgmac100: Allow building on ARM64 Jacky Chou
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-162704@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jacky_chou@aspeedtech.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.