🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7041

Re: [PATCH net-next v4 1/7] dt-bindings: net: ftgmac100: Make Aspeed compatibles standalone

#7041
From: netdev-bot+sashiko
Date: Sat, 24 Oct 2026 12:14
164 lines
14693 bytes
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 3 · 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).

- [Medium] The commit message's reason for the change does not hold up
  for the code at this commit.
- [Medium] The binding now asks for a standalone "aspeed,ast2400-mac" /
  "aspeed,ast2500-mac" / "aspeed,ast2600-mac" compatible with no…
- [Medium] The patch deletes the `items: [enum: [aspeed,ast2400-mac,
  aspeed,ast2500-mac, aspeed,ast2600-mac], const: faraday,ftgmac100]`…

--

dt-bindings: net: ftgmac100: Make Aspeed compatibles standalone

This patch changes the faraday,ftgmac100 binding so that aspeed,ast2400-mac,
aspeed,ast2500-mac and aspeed,ast2600-mac are standalone compatibles. It
drops the two-string form that carried the "faraday,ftgmac100" fallback.
The examples now use "aspeed,ast2500-mac" on its own.

> 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: Medium]
Is this rationale accurate for the driver at this commit?

In drivers/net/ethernet/faraday/ftgmac100.c, ftgmac100_of_match[] has
dedicated Aspeed entries ahead of the generic one:

    { .compatible = "aspeed,ast2400-mac",
      .data = &ftgmac100_match_data_ast2400},
    ...
    { .compatible = "faraday,ftgmac100",
      .data = &ftgmac100_match_data_faraday },

The most specific compatible wins. So a node with "aspeed,astXXXX-mac",
"faraday,ftgmac100" always gets the Aspeed mac_id, and ftgmac100_probe()
then does:

    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;

The two-string form this patch removes therefore can't reach the BIT(15)
and no-clock path. The only node that could reach it is one with just
"faraday,ftgmac100", and the binding still accepts that through
"- const: faraday,ftgmac100".

The DMA mask claim also doesn't seem to match the driver. Nothing under
drivers/net/ethernet/faraday/ calls dma_set_mask*() at this commit. Even at
the end of the series, the only DMA mask set is the 35-bit one under
FTGMAC100_QUIRK_DMA_35BIT, and only the AST2700 match data selects it.

The note below the --- line says there is no known combination "where a
node has actually bound through the generic entry and gotten the wrong
EDORR bit". Before commit 03a2aba50b2c ("net: ftgmac100: List all
compatibles"), though, "faraday,ftgmac100" was the driver's only of_match
entry. Every Aspeed MAC bound through it, and the driver detected Aspeed
afterwards with of_device_is_compatible(). In those kernels the fallback
was how the device bound, not a hazard.

Could the commit message give the real reason for the change and drop the
DMA mask claim?

> diff --git a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
> index d14410018bcf6..c870dd0bda7b2 100644
> --- a/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
> +++ b/Documentation/devicetree/bindings/net/faraday,ftgmac100.yaml
> @@ -13,12 +13,10 @@ properties:
>    compatible:
>      oneOf:
>        - const: faraday,ftgmac100
> -      - items:
> -          - enum:
> -              - aspeed,ast2400-mac
> -              - aspeed,ast2500-mac
> -              - aspeed,ast2600-mac
> -          - const: faraday,ftgmac100

[Severity: Medium]
Should this items branch stay in the oneOf with deprecated: true instead of
being removed?

All eight Aspeed MAC nodes in the tree still use the two-string form:

arch/arm/boot/dts/aspeed/aspeed-g4.dtsi (mac0, mac1):
    compatible = "aspeed,ast2400-mac", "faraday,ftgmac100";

arch/arm/boot/dts/aspeed/aspeed-g5.dtsi (mac0, mac1):
    compatible = "aspeed,ast2500-mac", "faraday,ftgmac100";

arch/arm/boot/dts/aspeed/aspeed-g6.dtsi (mac0 to mac3):
    compatible = "aspeed,ast2600-mac", "faraday,ftgmac100";

Every remaining oneOf branch matches a single string. Won't every
AST2400/AST2500/AST2600 board DTB now fail dtbs_check? The schema would
also stop describing the DT form that is deployed in the field.

No later patch in this series touches arch/ or brings the old form back.
The "dt-bindings: net: ftgmac100: Add AST2700 compatible" patch only adds
aspeed,ast2700-mac to the enum plus new if blocks. The tree stays
inconsistent until a separate series lands through another tree.

Runtime binding on this kernel is not affected, because of_match prefers
the first compatible.

> +      - enum:
> +          - aspeed,ast2400-mac
> +          - aspeed,ast2500-mac
> +          - aspeed,ast2600-mac

[ ... ]

> @@ -94,14 +92,14 @@ unevaluatedProperties: false
>  examples:
>    - |
>      ethernet@1e660000 {
> -        compatible = "aspeed,ast2500-mac", "faraday,ftgmac100";
> +        compatible = "aspeed,ast2500-mac";
>          reg = <0x1e660000 0x180>;
>          interrupts = <2>;
>          use-ncsi;
>      };

[Severity: Medium]
What happens when a DTB written to this binding boots on a kernel that
doesn't have commit 03a2aba50b2c ("net: ftgmac100: List all compatibles")?

Before that commit, ftgmac100_of_match[] had only:

    { .compatible = "faraday,ftgmac100" },

Aspeed variants were identified after binding, with
of_device_is_compatible().

On those kernels, a node with only "aspeed,ast2500-mac" matches nothing.
That includes stable and LTS branches without 03a2aba50b2c. The Ethernet
MAC would never probe, which on BMCs usually means losing NC-SI and network
management. Other DT consumers that match only the generic string would be
affected the same way.

The fallback is what lets new DTBs work with older software. Could the
commit message mention this forward compatibility cost, instead of calling
the change only "a binding correctness fix"?

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261020-support_ast2700-v4-0-4d36b40939b3%40aspeedtech.com
Technical Details
Message-ID: <179284408591.3134.16629228418200101664@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351361-linux-kernel-netdev=dewy.ru
References: <20261020-support_ast2700-v4-1-4d36b40939b3@aspeedtech.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351361-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v4 1/7] dt-bindings: net: ftgmac100: Make Aspeed
 compatibles standalone
Date: Sat, 24 Oct 2026 12:14:45 +0000
Organization: Usenet Network
Message-ID: <179284408591.3134.16629228418200101664@kernel.org>
References: <20261020-support_ast2700-v4-1-4d36b40939b3@aspeedtech.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="753354"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:UdyViQixMGsnzS0rJsQP9oqjo6s= sha256:RcdtfByffpkB2jfmBLcME1QUGaG3iqpB43Qjvl+KDvU=
	sha1:mJs6nCjRY2FD+cHkHb98AWujZhc= sha256:3gneZpnqrhg3yPEWd2dmuM+IJtQWY7vG9vJqPHPm7TI=
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 9583011162E; Sat, 24 Oct 2026 15:16:41 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.639
X-Spam-Status: No, score=-2.639 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.339,
	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] 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 l4OlwYFqp2QR;
	Sat, 24 Oct 2026 15:16:37 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-351361-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 sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 92D43111617; Sat, 24 Oct 2026 15:16:28 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 8E54629A74; Sat, 24 Oct 2026 12:15:09 +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=1792844098;
	b=NUdoQylVdtvcGQzscNqtd2OgJCVsLNT6ivmfco1kJd31bsWcRhyacEVN20Az+XtxIQ7L
	 4PKpNFVKqTMaVCgKh6hj1eeQLwidNKnA4OUfauI0sYzLkbgpl3kA00I+uBnrcaHcMhaYS
	 4oE6s0LTIuqOk/zQAO4wYepp/swUaliY6nFYqX0CwnVJIwWoHAZzisDweT0PNXwx5HrF6
	 M+W797iso3BbDXyq5QVRwTZ4iYPbJ8zoyzlJ4c7pN2n62Ujtf30FUJLeA/ADrEHU6uSmv
	 r7dNaLFqnw0VD0equieNIzf7TqFfFjgID4IkG0DPa648y3abTleuGMMxdJwHnccnSGw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792844098;
	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=K7LxKW+FRj6QhUxGWybJkziD8iYolGetDeRLOo4voUU=;
	b=YKVk9GQIldPvDCkMlnclv11n+o1QQbPLNIT0zuU+S9Yc6gwEv48X/k9CPKSjr2ydh2xQ
	 tY/8Yj5864z21GDJztGqKWmIXoOWHNIqqk+5YIGJAGgU6/flCB/lTAykGQjeFZ39SqItJ
	 cHXLMVFg5qk30ROjsmSrXhmDn5LN4AoAY49H51sQb3B2JNMeHLc99z0fa+n+SGHp6F8vL
	 P6T7VqYGE8VVcUdxlf1pAp+dNSmG21/zXpXeD1HBMtWRvy5wfI2onvYbu2jq4B64y031E
	 4aAgoOG1t5K1q690m0i/+xJy6Nrbe/pEMUyhVxVzpV7yfAYXUJQF2aR8c4EYUUQL1ow==
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=Jadg3h8S;
	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 D0655606A330;
	Sat, 24 Oct 2026 12:14:58 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Jadg3h8S
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=1792844088;
	b=JX2tIS6mGyAkgHHF+QPNR0NAAdldsMQzU9AS7+sE53u6oyNFjX3TDtRFaXU3KGd7TXRl
	 FqX2Q9dQ545ARaYU76UU8F/cXyN08k0WuNbiQlMgcSl39mhXK8iMLEuC2iK+PKmCHx49I
	 4SlFgLGFCWhPw0NG1ksM+7GygkQ28sjnfkBBawMNMw58NXpwv2XAt2zkClYDGXYwlgtKd
	 bPCj+CdPnQcpbQHYwJIveP44rPEtbPPNbZWCTEc5sXCAkpe/D31C1Irokfl462vXH5DSr
	 2PPhexNQ/eGcYYBKueZg46M2fxDnd3qdAcb5PMq5ZG+gSlNe+OtgpCwmzpavKUk2aPw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792844088;
	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=K7LxKW+FRj6QhUxGWybJkziD8iYolGetDeRLOo4voUU=;
	b=IRnLYA7gVRuIrwNiZmkOeGvSo5zshFNawENCxsm8qjYB9cUoSJBNBO27gCQuD0bOf1TB
	 u7Wh4WeBuQRGx5D88m+o3RczdbQWGST19agQC28hybc6s+pVnaAiAB4z4TUBKTXGdu/AG
	 PZjaEVFQwizTrLJtpSoxTmU2UFj4DUx2oAHbyPAgdW2Gin0MU+bDFsTDvp4mvBajmeftk
	 uwMHivhSNR8J2WUn61btZ85FJFlIFjmuoxxZ3blXIMsP/7nC64svvYGPpMmI6sH/jsb1G
	 aoBWrtE5FPqxM3lB+fvDPTmnTIKlv/8N55w9b6DypMEwbrWcFhppgDI+l6h5yWD6f5Q==
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=Jadg3h8S;
	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 9CFBF606A31A;
	Sat, 24 Oct 2026 12:14:47 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 577411F01825;
	Sat, 24 Oct 2026 12:14:46 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792844087;
	bh=K7LxKW+FRj6QhUxGWybJkziD8iYolGetDeRLOo4voUU=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=Jadg3h8SLRb3uUDnsNzEkg1KuYpxgcXTiIhDw3HrtvHPdm/Ff70F6TssleNtZkArV
	 8JHRx/LjVeNGGUrfaOZNMCsMAMvGaLxdGb59xyhYp9K9qGPIeirup446eQJuCVEkp8
	 RvsTRP+pPB2JmXO2vF99A5VVEL1e6xnKmY5TeW5Jd3EY7WNlOomoakwl/c8WCztKUm
	 +PAOrPTes4AL9YwyrunlLh1Lz8otExVHTQmj/HLrPWgPnyd91bb+fMKdS+G4AddGQZ
	 iN0CWJWgIes/rLWjwcahyrKIDYHuUJHdZKWDo1s1dFezUkomUNrqbLzlVV9MaUjWQa
	 IH+9IFBthob5Q==
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: <20261020-support_ast2700-v4-1-4d36b40939b3@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