From: netdev-bot+sashiko@kernel.org
To: jacky_chou@aspeedtech.com
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, ratbert@faraday-tech.com,
edumazet@kernel.org, hkallweit1@gmail.com, linux@armlinux.org.uk,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, andrew@lunn.ch
Subject: Re: [PATCH net-next v7 1/7] dt-bindings: net: ftgmac100: Make Aspeed compatibles standalone
Date: Mon, 23 Nov 2026 10:13:11 +0000 [thread overview]
Message-ID: <179542879143.3135.17776735347529304516@kernel.org> (raw)
In-Reply-To: <20261119-support_ast2700-v7-1-33c8ca2d0dd7@aspeedtech.com>
Thank you for your contribution! Sashiko AI review found 4 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 2 · Low: 2
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).
- [Medium] The binding no longer accepts the established two-string
compatible form ("aspeed,ast2400/2500/2600-mac", "faraday,ftgmac100"),…
- [Medium] With the new allOf conditionals, no node using the plain
"faraday,ftgmac100" compatible can pass validation, even though the…
- [Low] The commit message says that binding the AST2400/2500/2600 MACs
through the generic entry would 'leave the DMA mask too narrow'.
- [Low] For aspeed,ast2500-mac and aspeed,ast2600-mac, the new per-
compatible block (lines 101-117) limits `clocks` (1-2) and `clock-…
--
dt-bindings: net: ftgmac100: Make Aspeed compatibles standalone
This patch makes aspeed,ast2400-mac, aspeed,ast2500-mac and
aspeed,ast2600-mac standalone compatibles. They no longer need the
"faraday,ftgmac100" fallback. It also adds per-compatible constraints on
clocks and clock-names, and requires clock-names when two clocks are listed.
> The aspeed,ast2400-mac, aspeed,ast2500-mac, and aspeed,ast2600-mac
> compatibles are currently only valid when paired with the generic
> "faraday,ftgmac100" fallback: if a node ever bound through the
> generic entry alone, ftgmac100_probe() would set
> rxdes0_edorr_mask/txdes0_edotr_mask to BIT(15) instead of the Aspeed
> BIT(30), skip Aspeed clock setup, and leave the DMA mask too narrow.
[Severity: Low]
Is the DMA mask part accurate for these three compatibles?
At this commit, drivers/net/ethernet/faraday/ftgmac100.c has no
dma_set_mask*() or DMA_BIT_MASK() call. ftgmac100_probe() uses mac_id for
only three things: picking the EDORR/EDOTR bits, setting is_aspeed, and
calling ftgmac100_setup_clk():
if (priv->mac_id == FTGMAC100_AST2400 ||
priv->mac_id == FTGMAC100_AST2500 ||
priv->mac_id == FTGMAC100_AST2600) {
priv->rxdes0_edorr_mask = BIT(30);
priv->txdes0_edotr_mask = BIT(30);
priv->is_aspeed = true;
Later in the series, the only DMA mask call is
dma_set_mask_and_coherent(..., DMA_BIT_MASK(35)), and it is gated by
FTGMAC100_QUIRK_DMA_35BIT. That quirk is set only for the AST2700 match
data.
Could the "leave the DMA mask too narrow" clause be dropped from the
commit message?
> diff --git a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
> index d14410018bcf6..9d352e3686aaf 100644
> --- a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
> +++ b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
> @@ -11,14 +11,11 @@ maintainers:
>
> properties:
> compatible:
> - oneOf:
> - - const: faraday,ftgmac100
> - - items:
> - - enum:
> - - aspeed,ast2400-mac
> - - aspeed,ast2500-mac
> - - aspeed,ast2600-mac
> - - const: faraday,ftgmac100
> + enum:
> + - faraday,ftgmac100
> + - aspeed,ast2400-mac
> + - aspeed,ast2500-mac
> + - aspeed,ast2600-mac
[Severity: Medium]
With the oneOf/items branch removed, does the established two-string form
("aspeed,astXXXX-mac", "faraday,ftgmac100") become invalid?
Every MAC node in aspeed-g4.dtsi, aspeed-g5.dtsi and aspeed-g6.dtsi uses
that form, for example:
arch/arm/boot/dts/aspeed/aspeed-g6.dtsi:
compatible = "aspeed,ast2600-mac", "faraday,ftgmac100";
All eight of those nodes would fail dtbs_check as soon as this lands.
The planned follow-up dtsi change would then drop the fallback. Before
commit 03a2aba50b2c ("net: ftgmac100: List all compatibles"),
ftgmac100_of_match[] had only:
{ .compatible = "faraday,ftgmac100" },
Those kernels told the Aspeed variants apart afterwards with
of_device_is_compatible().
Wouldn't a DTB without the fallback leave those older kernels, including
current LTS kernels, with no Ethernet driver bound at all?
The commit message calls binding through the generic entry a hypothetical
hazard ("if a node ever bound through the generic entry alone"). On
kernels before 03a2aba50b2c, that was the only way these nodes bound, and
it worked.
With the current driver, of_match scoring already prefers the more
specific Aspeed string over the fallback. So the two-string form doesn't
run into the problem the commit message describes either.
The impact is mentioned only below the --- line, which is dropped when the
patch is applied. That note also covers only the dtbs_check warnings.
Would keeping the two-string form as a deprecated: true oneOf branch avoid
breaking older kernels? This is still the case at the end of the series.
>
> reg:
> maxItems: 1
> @@ -88,22 +85,76 @@ allOf:
[ ... ]
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - aspeed,ast2500-mac
> + - aspeed,ast2600-mac
> + then:
> + properties:
> + clocks:
> + minItems: 1
> + maxItems: 2
> + clock-names:
> + minItems: 1
> + maxItems: 2
> + required:
> + - clocks
[Severity: Low]
Should the clocks and clock-names counts be tied together here?
The two limits are set separately. The later rule only requires
clock-names to be present when two clocks are listed. So this passes:
clocks = <&a>, <&b>;
clock-names = "MACCLK";
However, the driver looks up the second clock by name:
drivers/net/ethernet/faraday/ftgmac100.c:ftgmac100_setup_clk() {
...
priv->rclk = devm_clk_get_optional_enabled(priv->dev, "RCLK");
...
}
The missing name returns -ENOENT, which the optional API turns into NULL.
Probe then succeeds without enabling the RCLK gate.
The reverse mismatch also passes, and an in-tree example exists. &mac3 in
aspeed-bmc-ampere-mtmitchell.dts has:
clock-names = "MACCLK", "RCLK";
but it inherits only one clock from aspeed-g6.dtsi. The old schema already
accepted that case, so it isn't new with this patch. Both cases assume
dt-schema has no generic check that a *-names list matches the length of
its property.
> + - if:
> + not:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - aspeed,ast2400-mac
> + - aspeed,ast2500-mac
> + - aspeed,ast2600-mac
> + then:
> + properties:
> + clocks: false
> + clock-names: false
> + - if:
> + properties:
> + clocks:
> + minItems: 2
> + then:
> + required:
> + - clock-names
[Severity: Medium]
Can a node using the plain "faraday,ftgmac100" compatible pass validation
with these two blocks?
The not-Aspeed block forbids both clocks and clock-names for that
compatible. This last if has no required: [clocks]. When clocks is absent,
the properties check is vacuously true, so the then branch still applies.
The commit message says a faraday,ftgmac100 node should have no clocks
("the plain faraday,ftgmac100 compatible takes none"). Such a node would
get:
'clock-names' is a required property
even though the block above forbids clock-names.
The driver still binds this compatible through
ftgmac100_match_data_faraday. The examples only cover ast2500 nodes with
clocks, so dt_binding_check doesn't catch this. The blocks are unchanged
at the end of the series.
Would adding required inside the if fix this? For example:
- if:
required:
- clocks
properties:
clocks:
minItems: 2
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261119-support_ast2700-v7-0-33c8ca2d0dd7%40aspeedtech.com
next prev parent reply other threads:[~2026-11-23 10:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 9:32 [PATCH net-next v7 0/7] net: ftgmac100: Add AST2700 support Jacky Chou
2026-11-19 9:32 ` [PATCH net-next v7 1/7] dt-bindings: net: ftgmac100: Make Aspeed compatibles standalone Jacky Chou
2026-11-23 10:13 ` netdev-bot+sashiko [this message]
2026-11-19 9:32 ` [PATCH net-next v7 2/7] dt-bindings: net: ftgmac100: Add AST2700 compatible Jacky Chou
2026-11-23 10:13 ` netdev-bot+sashiko
2026-11-19 9:32 ` [PATCH net-next v7 3/7] net: ftgmac100: Add AST2700 compatible support Jacky Chou
2026-11-23 10:13 ` netdev-bot+sashiko
2026-11-19 9:32 ` [PATCH net-next v7 4/7] net: ftgmac100: Enable AST2700 RMII support Jacky Chou
2026-11-23 10:13 ` netdev-bot+sashiko
2026-11-19 9:32 ` [PATCH net-next v7 5/7] net: ftgmac100: Require phy-mode for AST2700 Jacky Chou
2026-11-23 10:13 ` netdev-bot+sashiko
2026-11-19 9:32 ` [PATCH net-next v7 6/7] net: ftgmac100: Add AST2700 upper DMA address support Jacky Chou
2026-11-23 10:13 ` netdev-bot+sashiko
2026-11-19 9:32 ` [PATCH net-next v7 7/7] net: ftgmac100: Allow building on ARM64 Jacky Chou
2026-11-23 10:13 ` 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=179542879143.3135.17776735347529304516@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=jacky_chou@aspeedtech.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ratbert@faraday-tech.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