Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Linus Walleij" <linusw@kernel.org>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v3 1/5] net: dsa: microchip: Add fallback Micrel compatibles
Date: Sat, 30 May 2026 00:49:00 +0000	[thread overview]
Message-ID: <20260530004900.8C1C51F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260526-ks8995-to-ksz8-v3-1-c530f651989f@kernel.org>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Making the KS8995 driver mutually exclusive with the KSZ SPI driver temporarily breaks support for legacy `micrel,ks8995` hardware, causing a bisection regression.
- [Medium] The Kconfig dependency `depends on !NET_DSA_MICROCHIP_KSZ_SPI` fails to prevent both drivers from being built as modules, defeating the stated purpose of avoiding probe races.
--

commit ca8ff9ab891d7b4494af8f583c533c66ec764e52
Author: Linus Walleij <linusw@kernel.org>

net: dsa: microchip: Add fallback Micrel compatibles

This commit adds fallback Micrel compatibles for KSZ SPI devices to allow them
to use the more capable KSZ driver. It also adds a Kconfig exclusion to avoid
probe races with the KS8995 driver.

> diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
> index 4ab567c5bbafc..e704ab702c189 100644
> --- a/drivers/net/dsa/Kconfig
> +++ b/drivers/net/dsa/Kconfig
> @@ -100,6 +100,7 @@ config NET_DSA_RZN1_A5PSW
>  config NET_DSA_KS8995
>  	tristate "Micrel KS8995 family 5-ports 10/100 Ethernet switches"
>  	depends on SPI
> +	depends on !NET_DSA_MICROCHIP_KSZ_SPI

[Severity: Medium]
Does this dependency successfully prevent both drivers from being built as
modules?

Because NET_DSA_MICROCHIP_KSZ_SPI is a tristate config, configuring it as 'm'
makes '!NET_DSA_MICROCHIP_KSZ_SPI' evaluate to 'm'. This satisfies the
dependency for NET_DSA_KS8995, allowing it to also be built as a module,
which could allow the probe races this patch intended to fix. To strictly
enforce mutual exclusion, would `depends on NET_DSA_MICROCHIP_KSZ_SPI = n`
be required?

I note this issue is later resolved by commit 19ced6cb5c2f1 ("net: dsa:
ks8995: Delete surplus driver") which completely removes the KS8995 driver.

[Severity: High]
Does making this driver mutually exclusive with the KSZ SPI driver
temporarily break support for legacy micrel,ks8995 hardware?

If CONFIG_NET_DSA_MICROCHIP_KSZ_SPI=y, Kconfig forces CONFIG_NET_DSA_KS8995=n.
However, at this commit, the KSZ SPI driver does not yet support the older
micrel,ks8995 switches. Could this break network functionality for those
devices during bisection?

I see support is restored later in the series by commit 2e706ae441971
("net: dsa: microchip: Support Microchip KSZ8995XA / KS8995XA"), which
ports KS8995 support to the new KSZ SPI driver.

>  	select NET_DSA_TAG_NONE
>  	help
>  	  This driver supports the Micrel KS8995 family of 10/100 Mbit ethernet

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260526-ks8995-to-ksz8-v3-0-c530f651989f@kernel.org?part=1

  reply	other threads:[~2026-05-30  0:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 15:59 [PATCH net-next v3 0/5] net: dsa: microchip: Add support for KSZ8995XA/KS8995XA Linus Walleij
2026-05-26 15:59 ` [PATCH net-next v3 1/5] net: dsa: microchip: Add fallback Micrel compatibles Linus Walleij
2026-05-30  0:49   ` sashiko-bot [this message]
2026-05-26 15:59 ` [PATCH net-next v3 2/5] dt-bindings: net: dsa: microchip: Add KSZ8995XA Linus Walleij
2026-05-26 15:59 ` [PATCH net-next v3 3/5] net: dsa: tag_ks8995: Add the KS8995 tag handling Linus Walleij
2026-05-30  0:49   ` sashiko-bot
2026-05-26 15:59 ` [PATCH net-next v3 4/5] net: dsa: microchip: Support Microchip KSZ8995XA / KS8995XA Linus Walleij
2026-05-30  0:49   ` sashiko-bot
2026-05-26 15:59 ` [PATCH net-next v3 5/5] net: dsa: ks8995: Delete surplus driver Linus Walleij
2026-05-30  0:49   ` sashiko-bot

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=20260530004900.8C1C51F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linusw@kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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