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

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The Kconfig dependency `depends on !NET_DSA_MICROCHIP_KSZ_SPI` fails to enforce mutual exclusivity for modules and breaks hardware support for the 'micrel,ks8995' switch.
--

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

net: dsa: microchip: Add fallback Micrel compatibles

This commit adds legacy Micrel bindings to the KSZ SPI driver so they
can use the more capable driver. It also attempts to make the KS8995
driver mutually exclusive with the KSZ SPI driver to avoid probe races.

> diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
> index 39fb8ead16b5f..b91b9766ebc28 100644
> --- a/drivers/net/dsa/Kconfig
> +++ b/drivers/net/dsa/Kconfig
> @@ -98,6 +98,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: High]
Does this dependency properly enforce mutual exclusivity for modules?

In Kconfig, the ! operator applied to a tristate module (m) evaluates
to m (!m = m). If NET_DSA_MICROCHIP_KSZ_SPI is built as a module,
NET_DSA_KS8995 can also be built as a module, allowing both to compile and
potentially leaving the probe race open. Strict mutual exclusion for
tristates typically requires depending on NET_DSA_MICROCHIP_KSZ_SPI = n.

Additionally, if NET_DSA_MICROCHIP_KSZ_SPI=y, this forces NET_DSA_KS8995=n,
which completely disables the KS8995 driver. Since the new ksz_spi driver
does not yet support the original micrel,ks8995 hardware in this commit,
does this cause a temporary loss of hardware support for ks8995 users that
breaks git bisect?

I see both of these issues are resolved later in the series: the hardware
support is added in commit 3134f79144b9d ("net: dsa: microchip: Support
Microchip KSZ8995XA / KS8995XA"), and the Kconfig logic flaw is removed
when the old driver is deleted entirely in commit 088a820a81246 ("net:
dsa: ks8995: Delete surplus driver").

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260522-ks8995-to-ksz8-v2-0-5712c0dc9e75@kernel.org?part=1

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

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

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=20260530004650.65BB91F00893@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