From: sashiko-bot@kernel.org
To: "Linus Walleij" <linusw@kernel.org>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH net-next v7 1/5] net: dsa: microchip: Add fallback Micrel compatibles
Date: Sun, 05 Jul 2026 19:40:09 +0000 [thread overview]
Message-ID: <20260705194010.6EEF81F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260704-ks8995-to-ksz8-v7-1-2af0eaa545a8@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] SPI ID matching fails unconditionally because `ksz_spi_ids[]` does not populate `.driver_data`.
--
commit 3f99242404cf6d700265212085488f0c82dd5a7d
Author: Linus Walleij <linusw@kernel.org>
net: dsa: microchip: Add fallback Micrel compatibles
This commit adds legacy Micrel device tree bindings to the KSZ SPI driver so
users can use the more capable driver. It also makes 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 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: High]
This is a pre-existing issue, but does making these drivers mutually exclusive
break legacy SPI board file instantiation for ks8995 users?
SPI ID matching in ksz_spi.c fails unconditionally because ksz_spi_ids[]
omits the .driver_data pointers:
drivers/net/dsa/microchip/ksz_spi.c:ksz_spi_ids[] = {
{ "ksz8463" },
{ "ksz8765" },
// ... missing .driver_data pointers ...
};
When the device is probed via SPI ID matching (e.g., legacy platform data or
SPI sysfs) rather than Device Tree, device_get_match_data() falls back to
checking spi_get_device_id(spi)->driver_data, which evaluates to NULL:
drivers/net/dsa/microchip/ksz_spi.c:ksz_spi_probe() {
...
chip = device_get_match_data(ddev);
if (!chip)
return -EINVAL;
...
}
Since the original ks8995 driver correctly handled SPI ID matching, forcing
ks8995 users to use the KSZ SPI driver will cause their devices to fail
probing with -EINVAL.
> 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/20260704-ks8995-to-ksz8-v7-0-2af0eaa545a8@kernel.org?part=1
next prev parent reply other threads:[~2026-07-05 19:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-04 19:39 [PATCH net-next v7 0/5] net: dsa: microchip: Add support for KSZ8995XA/KS8995XA Linus Walleij
2026-07-04 19:39 ` [PATCH net-next v7 1/5] net: dsa: microchip: Add fallback Micrel compatibles Linus Walleij
2026-07-05 19:40 ` sashiko-bot [this message]
2026-07-04 19:39 ` [PATCH net-next v7 2/5] dt-bindings: net: dsa: microchip: Add KSZ8995XA Linus Walleij
2026-07-04 19:39 ` [PATCH net-next v7 3/5] net: dsa: tag_ks8995: Add the KS8995 tag handling Linus Walleij
2026-07-05 19:40 ` sashiko-bot
2026-07-04 19:39 ` [PATCH net-next v7 4/5] net: dsa: microchip: Support Microchip KSZ8995XA / KS8995XA Linus Walleij
2026-07-05 19:40 ` sashiko-bot
2026-07-04 19:39 ` [PATCH net-next v7 5/5] net: dsa: ks8995: Delete surplus driver Linus Walleij
2026-07-05 19:40 ` 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=20260705194010.6EEF81F000E9@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