Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: arthur@marmottus.net
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org, arnd@arndb.de,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [net-next,v6,2/3] dt-bindings: net: wiznet,w5100: add link status interrupt
Date: Thu, 03 Sep 2026 00:56:02 +0000	[thread overview]
Message-ID: <178839696296.3394541.3451749357764265327@kernel.org> (raw)
In-Reply-To: <20260831-wiznet-link-gpio-v6-2-abee6c5c966e@marmottus.net>

Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider:

Critical: 0 · High: 0 · Medium: 1 · Low: 1

- [Medium] Incomplete per-variant schema constraint in
  Documentation/devicetree/bindings/net/wiznet,w5100.yaml: the new…
- [Low] Binding advertises a second (link-status/LINKLED) interrupt that
  no driver consumes.

--

dt-bindings: net: wiznet,w5100: add link status interrupt

This changes the interrupts property in the wiznet,w5100 binding from a
single entry to a two entry tuple with minItems: 1, so an optional second
interrupt tied to the LINKLED pin can be described.  The example is updated
to list two interrupts.

> diff --git a/Documentation/devicetree/bindings/net/wiznet,w5100.yaml b/Documentation/devicetree/bindings/net/wiznet,w5100.yaml
> index 601d828bae927..d0717ab45de6c 100644
> --- a/Documentation/devicetree/bindings/net/wiznet,w5100.yaml
> +++ b/Documentation/devicetree/bindings/net/wiznet,w5100.yaml
> @@ -24,7 +24,11 @@ properties:
>        - wiznet,w5500
>  
>    interrupts:
> -    maxItems: 1
> +    minItems: 1
> +    items:
> +      - description: Main interrupt (INT pin on the device).
> +      - description:
> +          Optional interrupt for link status changes (LINKLED pin on w5500).

[Severity: Medium]
The second item description says the LINKLED pin exists on the w5500, but
the interrupts definition here is unconditional, so should w5100 and w5200
nodes also be allowed to carry a second interrupt?

The compatible enum in this file covers all three parts:

  compatible:
    enum:
      - wiznet,w5100
      - wiznet,w5200
      - wiznet,w5500

and the only allOf entries are the two $ref lines:

  allOf:
    - $ref: /schemas/net/ethernet-controller.yaml#
    - $ref: /schemas/spi/spi-peripheral-props.yaml#

With no if/then block restricting interrupts by compatible string, a node
with compatible = "wiznet,w5100" and two interrupt entries passes
dt_binding_check even though the schema's own prose says the pin is w5500
only.

On the driver side, w5100_probe() only asks for the second interrupt on the
w5500:

  priv->link_irq = ops->chip_id == W5500 ?
                   fwnode_irq_get(dev_fwnode(dev), 1) : -ENODEV;

so a w5100 or w5200 device tree written with two interrupts validates
cleanly and the second entry is silently ignored with no diagnostic.

Would it make sense to add an if/then block constraining interrupts to
maxItems: 1 for wiznet,w5100 and wiznet,w5200, or alternatively to reword
the description so it no longer claims the capability is w5500 specific?
The v6 changelog mentions the conditional properties were removed, so was
dropping the per-compatible conditional here intentional?

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260831-wiznet-link-gpio-v6-0-abee6c5c966e%40marmottus.net

  parent reply	other threads:[~2026-09-03  0:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 12:53 [PATCH net-next v6 0/3] w5100: restore GPIO-based link detection Arthur Crepin Leblond
2026-08-31 12:53 ` [PATCH net-next v6 1/3] dt-bindings: net: wiznet,w5100: convert to DT schema Arthur Crepin Leblond
2026-09-03  0:56   ` [net-next,v6,1/3] " netdev-bot+sashiko
2026-08-31 12:53 ` [PATCH net-next v6 2/3] dt-bindings: net: wiznet,w5100: add link status interrupt Arthur Crepin Leblond
2026-09-01  9:58   ` Krzysztof Kozlowski
2026-09-03  0:56   ` netdev-bot+sashiko [this message]
2026-08-31 12:53 ` [PATCH net-next v6 3/3] w5100: detect carrier state using link status bit and optional interrupt Arthur Crepin Leblond
2026-09-03  0:56   ` [net-next,v6,3/3] " netdev-bot+sashiko
2026-09-03 13:08     ` Arthur Crepin Leblond
2026-09-03 15:10       ` Arthur Crepin Leblond

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=178839696296.3394541.3451749357764265327@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=arthur@marmottus.net \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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