From: netdev-bot+sashiko@kernel.org
To: linusw@kernel.org
Cc: woojung.huh@microchip.com, UNGLinuxDriver@microchip.com,
andrew@lunn.ch, olteanv@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
marex@denx.de, horms@kernel.org, linux@armlinux.org.uk,
nb@tipi-net.de, netdev@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v10 1/4] dt-bindings: net: dsa: microchip: Add KSZ8995XA
Date: Wed, 09 Sep 2026 12:39:16 +0000 [thread overview]
Message-ID: <178895755698.219967.14487699742720379802@kernel.org> (raw)
In-Reply-To: <20260908-ks8995-to-ksz8-v10-1-7379239eb65f@kernel.org>
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider:
Critical: 0 · High: 0 · Medium: 1 · Low: 1
- [Medium] In
Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml the new…
- [Low] Reported concern (validated as NOT a defect):
`microchip,ksz8995xa` is documented in…
--
dt-bindings: net: dsa: microchip: Add KSZ8995XA
This adds the compatible microchip,ksz8995xa to the Microchip KSZ DSA
switch binding, described as having the same properties as the KS8995XA
and being like the KSZ8795 and KSZ8864.
> diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
> index 8d4a3a9a33fcc..ed39530b6cbbb 100644
> --- a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
> @@ -23,6 +23,7 @@ properties:
> - microchip,ksz8864 # 4-port version of KSZ8895 family switch
> - microchip,ksz8873
> - microchip,ksz8895 # 5-port version of KSZ8895 family switch
> + - microchip,ksz8995xa
> - microchip,ksz9477
> - microchip,ksz9897
> - microchip,ksz9896
> @@ -122,6 +123,7 @@ allOf:
> enum:
> - microchip,ksz8863
> - microchip,ksz8873
> + - microchip,ksz8995xa
> then:
> $ref: dsa.yaml#/$defs/ethernet-ports
> else:
[Severity: Medium]
Is this second hunk intentional? The enum being extended here sits under
a "not:", so adding a compatible to it selects the "else" branch rather
than the "then" branch:
- if:
not:
properties:
compatible:
enum:
- microchip,ksz8863
- microchip,ksz8873
- microchip,ksz8995xa
then:
$ref: dsa.yaml#/$defs/ethernet-ports
else:
patternProperties:
"^(ethernet-)?ports$":
patternProperties:
"^(ethernet-)?port@[0-2]$":
The "else" branch is the hand-rolled KSZ88x3 schema. It only matches
port@0 through port@2, does not reference dsa.yaml#, and additionally
allows the KSZ88x3/REFCLKO-only flag microchip,rmii-clk-internal.
The KSZ8995XA is a 5-port part with the CPU port at index 4. The chip
data added later in this series, ksz_switch_chips[KSZ8995XA] in
drivers/net/dsa/microchip/ksz_common.c, has:
.cpu_ports = 0x10, /* can be configured as cpu port */
.port_cnt = 5, /* total cpu and user ports */
So for microchip,ksz8995xa, would port@3 and port@4 (including the MII
CPU port with ethernet/phy-mode/fixed-link) match no subschema and go
unvalidated, and would a node with no ports/ethernet-ports at all also
pass since the dsa.yaml base requirements are no longer applied?
The same silicon is also described by
Documentation/devicetree/bindings/net/dsa/micrel,ks8995.yaml, which
drivers/net/dsa/microchip/ksz_spi.c maps to the same
ksz_switch_chips[KSZ8995XA] entry. That file uses:
allOf:
- $ref: dsa.yaml#/$defs/ethernet-ports
and its example documents ethernet-port@0 through ethernet-port@4, which
is the opposite of the 3-port constraint now applied to
microchip,ksz8995xa.
This also seems to disagree with the commit message, which says the part
is "just like the KSZ8795 and KSZ8864" and "has the same properties as
the KS8995XA" - both microchip,ksz8795 and microchip,ksz8864 take the
"then" branch and use the generic dsa.yaml ethernet-ports schema.
Would dropping the second hunk and keeping only the top-level compatible
enum addition give the described behaviour?
The same negated enum entry is still present at the end of the series
(c34290e766e1566f450a527435a9398d135e21d4), so no later patch appears to
change it.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260908-ks8995-to-ksz8-v10-0-7379239eb65f%40kernel.org
next prev parent reply other threads:[~2026-09-09 12:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 9:38 [PATCH net-next v10 0/4] net: dsa: microchip: Add support for KSZ8995XA/KS8995XA Linus Walleij
2026-09-08 9:38 ` [PATCH net-next v10 1/4] dt-bindings: net: dsa: microchip: Add KSZ8995XA Linus Walleij
2026-09-09 9:39 ` sashiko-bot
2026-09-09 10:29 ` Linus Walleij
2026-09-09 12:39 ` netdev-bot+sashiko [this message]
2026-09-08 9:38 ` [PATCH net-next v10 2/4] net: dsa: tag_ks8995: Add the KS8995 tag handling Linus Walleij
2026-09-09 9:39 ` sashiko-bot
2026-09-09 10:47 ` Linus Walleij
2026-09-09 12:39 ` netdev-bot+sashiko
2026-09-08 9:38 ` [PATCH net-next v10 3/4] net: dsa: microchip: Support Microchip KSZ8995XA / KS8995XA Linus Walleij
2026-09-09 9:39 ` sashiko-bot
2026-09-09 10:51 ` Linus Walleij
2026-09-09 12:39 ` netdev-bot+sashiko
2026-09-08 9:38 ` [PATCH net-next v10 4/4] net: dsa: ks8995: Delete surplus driver Linus Walleij
2026-09-09 12:39 ` 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=178895755698.219967.14487699742720379802@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linusw@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=marex@denx.de \
--cc=nb@tipi-net.de \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=woojung.huh@microchip.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;
as well as URLs for NNTP newsgroup(s).