πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #22209

Re: [PATCH net-next v3 4/5] dt-bindings: net: hisilicon,hisi-gmac-v1: Allow fixed-link

#22209
From: netdev-bot+sashiko
Date: Wed, 25 Nov 2026 00:28
83 lines
10871 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] In Documentation/devicetree/bindings/net/hisilicon,hisi-
  gmac-v1.yaml, this patch states a rule only in the free-text…

--

dt-bindings: net: hisilicon,hisi-gmac-v1: Allow fixed-link

This patch makes phy-handle required only when no fixed-link is present.
It also adds a sentence to the mdio property description saying that, with
a fixed link, the MDIO bus is only registered when an mdio child node is
present.

> diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-gmac-v1.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-gmac-v1.yaml
> index a715298259552..c283c1b6ac723 100644
> --- a/Documentation/devicetree/bindings/net/hisilicon,hisi-gmac-v1.yaml
> +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-gmac-v1.yaml
> @@ -13,6 +13,13 @@ maintainers:
>  allOf:
>    - $ref: /schemas/net/ethernet-controller.yaml#
>    - $ref: /schemas/net/mdio.yaml#
> +  - if:
> +      not:
> +        required:
> +          - fixed-link
> +    then:
> +      required:
> +        - phy-handle
>  
>  properties:
>    compatible:

[ ... ]

> @@ -58,7 +65,8 @@ properties:
>      unevaluatedProperties: false
>      description:
>        Node containing PHY children. If this node is not present, then PHYs will
> -      be direct children.
> +      be direct children. With a fixed link, the MDIO bus is not registered
> +      unless this node is present.

[Severity: Low]
Should this rule be enforced by the schema, rather than stated only in the
description?

The top-level allOf still includes mdio.yaml. Its '@[0-9a-f]+$'
patternProperties allows MDIO device nodes directly under the ethernet
node. The new if/then block only decides whether phy-handle is required.

That means a node with fixed-link and direct children such as
ethernet-phy@N or switch@N, but no mdio subnode, still passes
dt_binding_check.

Later in the series, "net: hix5hd2_gmac: Support fixed-link" makes
hix5hd2_dev_probe() skip MDIO bus registration in that case:

drivers/net/ethernet/hisilicon/hix5hd2_gmac.c:hix5hd2_dev_probe() {
    ...
	if (mdio_np || priv->phy_node != node) {
    ...
}

The driver then ignores those direct children without any warning.

Would an "if: required: [fixed-link]" / "then:" block work here, one that
disallows '@[0-9a-f]+$' children directly on the ethernet node?

Also, the new sentence describes Linux driver behaviour ("the MDIO bus is
not registered") rather than the hardware. The GMAC's MDIO controller and
lines exist whether or not the MAC link is fixed.

Could the text be reworded as a description rule instead? For example: with
fixed-link, MDIO devices must be placed under the mdio node.

-- 
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261124002442.19414-1-mmyangfl%40gmail.com
Technical Details
Message-ID: <179556649875.3135.7423931333453595592@kernel.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370922-linux-kernel-netdev=dewy.ru
References: <20261124002442.19414-5-mmyangfl@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370922-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v3 4/5] dt-bindings: net: hisilicon,hisi-gmac-v1:
 Allow fixed-link
Date: Wed, 25 Nov 2026 00:28:18 +0000
Organization: Usenet Network
Message-ID: <179556649875.3135.7423931333453595592@kernel.org>
References: <20261124002442.19414-5-mmyangfl@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="72648"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:0o4qr/XCkX8ceG2PMtWGgPcNMfE= sha256:KqL1XIrpSqgdncSik6UO2H3X3tLaf4BiApL0Z9WKIlY=
	sha1:jOa3QGyMlwvEkKC6xY3rnRFkZlw= sha256:KJNCILlHiUiuEwo/v4IgV7oIDC8r/Ot9KrlfsT6G9sw=
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 E634C125E3B; Wed, 25 Nov 2026 03:28:37 +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 i4FwmTsiZUIu;
	Wed, 25 Nov 2026 03:28:34 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-370922-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 04BEB125E39; Wed, 25 Nov 2026 03:28:25 +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 8F9F538AFE; Wed, 25 Nov 2026 00:28:21 +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=1795566501;
	b=iAuweulU8h0+1+HvYuHbTnBwDhLxHycX9fh2MSwOM9Jno9FJ7ggxiqusk4jBseFHlaG5
	 quiI441F4y+Qvd7h5AsHxePB75DDWEhzOXzmChrBymQ3x4M688FYecfw4b5/C8k+r7EeN
	 AfmaWxsOD4zC9wMM4AGxxN4HLaO6YbtrNs1LA/tOmVVIa6YMQ5Q4gFxP0R826DU29zxfa
	 dEDO49DAW7ph9PL5dq+kn6iLIDsyn4DXyXcYQM6TtAEHWYV6gyYAMYCW2IPw67iez5CRc
	 Qiwe0BlLH4sDonSIrzYwEUhTDqHUuBdZJXAvT0cg1B8wo3Y0JRCt0y6B1gMA3pJ48Pg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795566501;
	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=uvcjdmGM+uH5QS9jgj3sj273EnYOZjoyvThLyjhPeyM=;
	b=4iEXDWROGAfxPt35KFDJWF8TwHWFDP0IPSNpoT2R0fMmgOOSWlitkYJKAJTeBzG3aEs4
	 xlc1hej5dxl/2VRcoCPledXmHNuBhrOAkwuD5XkSayhbMHd83cn56r03xdJY/GX54NXGy
	 StfJCUvjrlLddP3FC7gQQqGcb3a7NMV25NBKIk+Fi5PPJY4p+mdsoSOYAx1f5tuBiXU8z
	 c2zq0AA2wOjgx0/PQc90PCxg3t6nPsN6W3alipvlwIluRSgqpPezPbR4vZXBiS/kMYQ8I
	 X3hUw3BQd67WAsKWWgRDZDQpsj+7SYP2Z5XFb4IbbUF/JnBvYJ8+T1k+v1Be4SysJbw==
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=b4VDwVPM;
	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 630C3606A331;
	Wed, 25 Nov 2026 00:28:21 +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=b4VDwVPM
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=1795566500;
	b=Da01C6xa9HX1MovrFo/56OQ6Sqqy18XBQeL0ey9yQsnYPsH12vuEVX9oqWQxgYpnRNfn
	 tss52iHuM5LNP0bizPtw3qBPnzL9KlNmWYkdHmftULRV+nRGY2vc/CjvoDd0FbZFgC7zR
	 dmObeQ/datSnoNNKJy8G4INTEklmiVV9rAPdHNNBTnd8KqnKLrqEr3qZM/tErQY80map1
	 /O2eFOQm2eSf4ImhLI9khjim3DvAfiFK1P8eJI6OllOeBLRnWwPLBKc+5B1GiElK8PRsG
	 FTDAj5xuJ5l+Y3NSHl5rmO11+cLLVyetLHWful72alnZMXD/2TdV93MMM0KVNiqTK0A==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795566500;
	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=uvcjdmGM+uH5QS9jgj3sj273EnYOZjoyvThLyjhPeyM=;
	b=wMzDshwGSyYJXBLrhuZhv+1v6WyPIYFil7+qfLgV6debx/GKARkeRoTu4AAzvbld+Mg0
	 KixppezBp1QCExJN1D4tE8swvF1AHLxIIGYZB10sh62RvDKvXY8J6s37RGfTEvdQ1q2jX
	 yiP6SIl+TXXmQcFVy8Ww6UbJR/nOaV6Q4BXwoHvjwJB1oPRSByR5mC+bTLMEZbkYoiam6
	 389sVkeXgX1Hpse4BgU4LcHYXBM7E+DV1oXNCBqpYfL8J3Q5hl/Q+w6jdRvHnWAIW8vT6
	 Zl8y/tJJLwS/zv026vlzGbIEa1c2NY4WnX33wDsxEib4Lt1te1nSADmDDJwIdyjkhwA==
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=b4VDwVPM;
	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 807C3606A32D;
	Wed, 25 Nov 2026 00:28:20 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B4C71F000C6;
	Wed, 25 Nov 2026 00:28:19 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795566500;
	bh=uvcjdmGM+uH5QS9jgj3sj273EnYOZjoyvThLyjhPeyM=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=b4VDwVPMFFeP3ecq2qCD8/Hm9cShfOKBK5OfgDN+XQXw6k3aRwzyS8d4i+Y0PiQ0h
	 l05IgkqmJv7Ipt3NUBlyez82hBuFX7eH5qpf6f20DRjSXL1Vac8XcPg+hAiRGfAfap
	 swI6U0rGWssJKQC4SCc94eFPrWmv1KAezLmoGjRHJmpSKT3caP2oYIoHBK9BSJ9Wgo
	 LayzOn/2H8YACucE0yE2r/hw/dCHZHk5v38XZu9WVCFGcnO6ml4/pYS756QvHhgVC6
	 uj8NOuu2tMLw9tTIXWifXKcp6vfAnz317qlN6aVSXhTp7JIZR0JP+EPrd/OxlKHFvn
	 qqL+VQpGipCvw==
X-Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net,
 edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org,
 krzk+dt@kernel.org, conor+dt@kernel.org, shenjian15@huawei.com,
 shaojijie@huawei.com, devicetree@vger.kernel.org
X-In-Reply-To: <20261124002442.19414-5-mmyangfl@gmail.com>
X-sashiko-severity: Low
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