Devicetree
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: mmyangfl@gmail.com
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
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	[thread overview]
Message-ID: <179556649875.3135.7423931333453595592@kernel.org> (raw)
In-Reply-To: <20261124002442.19414-5-mmyangfl@gmail.com>

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

  reply	other threads:[~2026-11-25  0:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  0:24 [PATCH net-next v3 0/5] net: hix5hd2_gmac: Support fixed-link David Yang
2026-11-24  0:24 ` [PATCH net-next v3 1/5] net: hix5hd2_gmac: Use devm_ managed netdev and MDIO bus David Yang
2026-11-25  0:28   ` netdev-bot+sashiko
2026-11-24  0:24 ` [PATCH net-next v3 2/5] dt-bindings: net: hisilicon,hisi-gmac-v1: Add mdio bus child node David Yang
2026-11-24  0:24 ` [PATCH net-next v3 3/5] net: hix5hd2_gmac: Use mdio child node for MDIO bus if it exists David Yang
2026-11-25  0:28   ` netdev-bot+sashiko
2026-11-24  0:24 ` [PATCH net-next v3 4/5] dt-bindings: net: hisilicon,hisi-gmac-v1: Allow fixed-link David Yang
2026-11-25  0:28   ` netdev-bot+sashiko [this message]
2026-11-24  0:24 ` [PATCH net-next v3 5/5] net: hix5hd2_gmac: Support fixed-link David Yang
2026-11-25  0:28   ` 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=179556649875.3135.7423931333453595592@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=mmyangfl@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=shaojijie@huawei.com \
    --cc=shenjian15@huawei.com \
    /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