All of lore.kernel.org
 help / color / mirror / Atom feed
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: [net-next,v8,5/5] net: dsa: ks8995: Delete surplus driver
Date: Wed, 02 Sep 2026 09:50:42 +0000	[thread overview]
Message-ID: <178834264228.3394541.12479851753660032697@kernel.org> (raw)
In-Reply-To: <20260831-ks8995-to-ksz8-v8-5-fd1dbb2b76e8@kernel.org>

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

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

- [Low] After this patch drivers/net/dsa/microchip/ksz_spi.c (ksz_dt_ids,
  lines 236-249) is the only implementation of the compatibles…

--

net: dsa: ks8995: Delete surplus driver

This removes drivers/net/dsa/ks8995.c and its Makefile entry, since the
Microchip ksz driver now covers the same switches. NET_DSA_KS8995 is kept
in Kconfig as a transitional symbol that selects the ksz SPI driver.

> diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
> index 68fb175cc36ab..55a9714033a6f 100644
> --- a/drivers/net/dsa/Kconfig
> +++ b/drivers/net/dsa/Kconfig
> @@ -110,11 +110,13 @@ 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
> -	select NET_DSA_TAG_NONE
> +	select NET_DSA_MICROCHIP_KSZ_COMMON
> +	select NET_DSA_MICROCHIP_KSZ_SPI
>  	help
> -	  This driver supports the Micrel KS8995 family of 10/100 Mbit ethernet
> -	  switches, managed over SPI.
> +	  This is a transitional option for users who had NET_DSA_KS8995
> +	  enabled. It automatically enables the new NET_DSA_MICROCHIP_KSZ_SPI
> +	  driver which supersedes it. This option will be removed in a future
> +	  kernel release.
>  
>  config NET_DSA_SMSC_LAN9303
>  	tristate

[ ... ]

> diff --git a/drivers/net/dsa/ks8995.c b/drivers/net/dsa/ks8995.c
> deleted file mode 100644
> index 77d8b842693c1..0000000000000
> --- a/drivers/net/dsa/ks8995.c
> +++ /dev/null

[ ... ]

> -static const struct of_device_id ks8995_spi_of_match[] = {
> -	{ .compatible = "micrel,ks8995" },
> -	{ .compatible = "micrel,ksz8864" },
> -	{ .compatible = "micrel,ksz8795" },
> -	{ },
> -};
> -MODULE_DEVICE_TABLE(of, ks8995_spi_of_match);

[Severity: Low]
Should the devicetree binding be folded over as well when these three
compatibles move to the ksz driver?

After the deletion, ksz_dt_ids in drivers/net/dsa/microchip/ksz_spi.c is the
only implementation of micrel,ks8995, micrel,ksz8795 and micrel,ksz8864:

	{
		.compatible = "micrel,ksz8864",
		.data = &ksz_switch_chips[KSZ8864]
	},
	...
	{
		.compatible = "micrel,ks8995",
		.data = &ksz_switch_chips[KSZ8995XA]
	},

But the only schema selecting those strings is
Documentation/devicetree/bindings/net/dsa/micrel,ks8995.yaml, which was
written for the deleted driver and ends with:

	unevaluatedProperties: false

allowing only compatible, reg, reset-gpios, the dsa.yaml ethernet-ports and
spi-peripheral-props.

The surviving driver parses more than that for these chips. For example
ksz_mdio_register() in drivers/net/dsa/microchip/ksz_common.c does:

	mdio_np = of_get_child_by_name(dev->dev->of_node, "mdio");

and ksz_switch_register() looks at wakeup-source,
microchip,synclko-125/synclko-disable, microchip,pme-active-high,
micrel,fiber-mode and interrupts. Those properties are described only in
Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml, whose
compatible enum contains no micrel-prefixed string.

So a board that uses compatible = "micrel,ks8995" and adds an mdio child
node binds fine at runtime, but would dt_binding_check/dtbs_check reject it,
with no schema left that can describe it? Would it make sense to add the
micrel aliases to microchip,ksz.yaml (deprecated) or cross-reference it from
micrel,ks8995.yaml?

Both in-tree users, arch/arm/boot/dts/intel/ixp/intel-ixp42x-actiontec-mi424wr.dtsi
and arch/arm/boot/dts/intel/ixp/intel-ixp42x-linksys-wrv54g.dts, only use
compatible, reg, spi-max-frequency and ethernet-ports, so nothing fails
today.

Related, is this part of the micrel,ks8995.yaml description still accurate
now that the ksz driver handles the chip?

  The chip itself is managed over SPI, but all the PHYs need to be accessed
  from an external MDIO channel.

ksz_switch_chips[KSZ8995XA] in ksz_common.c declares

	.internal_phy = {true, true, true, true, false},

and the ksz driver can register an internal MDIO bus for those PHYs, so the
sentence reads like a property of the removed driver rather than of the
hardware.

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260831-ks8995-to-ksz8-v8-0-fd1dbb2b76e8%40kernel.org

      reply	other threads:[~2026-09-02  9:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 20:54 [PATCH net-next v8 0/5] net: dsa: microchip: Add support for KSZ8995XA/KS8995XA Linus Walleij
2026-08-31 20:54 ` [PATCH net-next v8 1/5] net: dsa: microchip: Add fallback Micrel compatibles Linus Walleij
2026-09-02  9:50   ` [net-next,v8,1/5] " netdev-bot+sashiko
2026-08-31 20:54 ` [PATCH net-next v8 2/5] dt-bindings: net: dsa: microchip: Add KSZ8995XA Linus Walleij
2026-09-02  9:50   ` [net-next,v8,2/5] " netdev-bot+sashiko
2026-08-31 20:54 ` [PATCH net-next v8 3/5] net: dsa: tag_ks8995: Add the KS8995 tag handling Linus Walleij
2026-09-02  9:50   ` [net-next,v8,3/5] " netdev-bot+sashiko
2026-08-31 20:54 ` [PATCH net-next v8 4/5] net: dsa: microchip: Support Microchip KSZ8995XA / KS8995XA Linus Walleij
2026-09-02  9:50   ` [net-next,v8,4/5] " netdev-bot+sashiko
2026-08-31 20:54 ` [PATCH net-next v8 5/5] net: dsa: ks8995: Delete surplus driver Linus Walleij
2026-09-02  9:50   ` netdev-bot+sashiko [this message]

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=178834264228.3394541.12479851753660032697@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.