Article View: linux.kernel.netdev
Article #20879Re: [PATCH net-next v7 1/7] dt-bindings: net: ftgmac100: Make Aspeed compatibles standalone
From: netdev-bot+sashiko
Date: Mon, 23 Nov 2026 10:13
Date: Mon, 23 Nov 2026 10:13
231 lines
16096 bytes
16096 bytes
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
Technical Details
Message-ID:
<179542879143.3135.17776735347529304516@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369231-linux-kernel-netdev=dewy.ruReferences:
<20261119-support_ast2700-v7-1-33c8ca2d0dd7@aspeedtech.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369231-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev 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 Organization: Usenet Network Message-ID: <179542879143.3135.17776735347529304516@kernel.org> References: <20261119-support_ast2700-v7-1-33c8ca2d0dd7@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3849002"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:0GA1xi6hnR/qtkHS/KJ6+Ua1WTw= sha256:ZRg2x2MZJG/YpkYjnNvXQDeo53r3Cu2UQS4eeQ1mJQg= sha1:vzTuz5u9FOQoAccXx2tiUGrdWWU= sha256:aIPKbIL64uIUy6VXiqqW2lddHM0rN/iaU4VLQidhp8k= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id CCC56125D9E; Mon, 23 Nov 2026 13:13:29 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B1aTXrbkuevS; Mon, 23 Nov 2026 13:13:25 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-369231-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 5712E125D99; Mon, 23 Nov 2026 13:13:17 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id A250531909; Mon, 23 Nov 2026 10:13:14 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795428794; b=ujH06avBVXc0+ZlPTf10neufuLF3+/VdZoWWXtxA7QYD2QixHmtSqVRAlvssMPaIc/+7 glckubLL5ti+jwG7Xrys87XDeSRNGB0a5Qhj3UBXRARzUGekQJTZWQGipq0fLmN8WiI8F PvvqcM7bW4weXGdlB3Fzh31fGj+bEYSYAn3hFyA8YtT2AZXlcoTdZmT0rfkiKiYrtNoCK KstRJo/xWQ+DRY2h8Ab25GXBNNXb6lysCNlCu/hQOVm1yG00SEs0/syxBL98Boynmd1dY UjxTis4F9SWl8R++2aaK0Q3N1kXfFRwr45FXRDYAXhI/PEPa73Y2pXrEBg8AldZQ4CQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795428794; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=8V3O6wyOQ9NrgDMzQPFf7QNUTcuIMnknpuo4OWvqhX4=; b=s84btMWSyomnIHC+oMxq9K8+AJWK88F9wADsw345CzEEYhwy2sdCoTM+Nkl4qfqOoS7z QswB8o/QhXnhsL8xikALnukSCtOD0v6JNrgkFtYNT1q6ZI0ivV8W4PNR/PWabrkBj0C/O 0t9wBBhegvgWI5o6sKlRWCjrN1/ACT5EMm6GXwCLm8lWV4VByPJlvrUOfy9SPq5NNN8op EEIGpzbIC2TdvdMSZukp/5eOvXHpIHjVRefbmFZPi4R+z0+R03F7+0Qeo9P4HWLVv85FT 0IaK3Uw+VpdKHPmlKRTLQmYGImG/76nbUpd4ZmK7jg0Ejra5uyI8e++YDwZRpkgVlbQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="nS/JSCDJ"; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 453F4606A332; Mon, 23 Nov 2026 10:13:14 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nS/JSCDJ X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795428793; b=n3ESgFJZptnvo5xSpbfBd3japqWUzSTdVJ1zMv2HP6WlW0hzWrBcJqs0GN/H60UZkUZ+ pIWtVj3nbrobvclt0Z1SkpLzhfs7VYD6UtSkWpfRzUbt2xk1+45TzGvyTSom7I9bxP+PT 8B+rz9AS0hlUHNbCTEDhELAKL3wkNFvr2j3zRY3VDPYlqbwjyfoTnzIbCan93Lk7d0JV7 SChIiLOp5OLZFotSS27CE9QbN1bo1jjH1cDSweFxQDR3mClw4vY+Vjp5jnM80EsOH822H +W24xx4gsYEFYA4zVvsPIRrXjGLBAtv+aQnPf/MsLG1OFcifxBHgdjMmByDzc67knYA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795428793; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=8V3O6wyOQ9NrgDMzQPFf7QNUTcuIMnknpuo4OWvqhX4=; b=zVT7kwyB4C8RVU+Bhp6k22PanvAqL8akB8fPO4FrNEuXmW6r8vRnMANz9xF7V+Nl/K8R WtnNb57kEaIjQrPOBnx7WNim34yMFPQR1U8i34vrBCmuAccploUTCGdOZMpxrI6/OFmdX UNY6xH01pgznv/jAbIiybr1xp/2l+vS90HS1aDQi1x5PjsQCByovaQCzr0K/qr9HWWzmy gX/MMfQVn5BI7ujXFrW973GmHupEM0Fe9yMWmXk9Itn/FdlmoEuOgvPSYcUsXCsmpoqcr Fr9uQNRBannkZf2HaWbbgAs/uujG4vZDB9caGMY8LOPMRPZKNV4q1JsR9Xuh0HcjqGA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="nS/JSCDJ"; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64BB5606A31E; Mon, 23 Nov 2026 10:13:13 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id D94251F000D1; Mon, 23 Nov 2026 10:13:11 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795428792; bh=8V3O6wyOQ9NrgDMzQPFf7QNUTcuIMnknpuo4OWvqhX4=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=nS/JSCDJsiFO8/ODNh/xFhy6VwhV6pza3huyX7ImGQ1HBn88f+Ow3Lrj8np4dhsGS h0dICaMMRuSnJwZ3EK4uLTtvTbWWNQs1P4w7vmO/d+43bd9HavmG85PSMmOQkXDcsd 4mhbmu36W0XGBk8TdhodPiE9TAqyQcMxHO6d6CYh7z2+rIGL+6buexnMhDUXr1hKg8 h8Pv5STySrhT5X8uIkfBkqMubbYOGqsm9gfyltoLSsQgVxSyIKIAsccHelnDfPep5A zsAcFGN3SxNdRwpGlFqRB9wkJnSRCP7VoHPCUhPQ0OdVbT0ANvJh+5TyfThjWQzH38 NQtr+R2K2gqHA== X-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 X-In-Reply-To: <20261119-support_ast2700-v7-1-33c8ca2d0dd7@aspeedtech.com> X-sashiko-severity: Medium X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list