[PATCH net-next v6 0/5] net: dsa: microchip: Add support for KSZ8995XA/KS8995XA
From: Linus Walleij <linusw@kernel.org>
Date: 2026-06-07 22:41:39
Also in:
linux-devicetree
This series breaks with the dated attempt to polish the old KS8995 driver, and instead implement support for the KS8995XA in the KSZ driver, and after that delete the old KS8995 driver. The hardware clearly has the same ancestry, the KSZ8995XA is just a rebrand of the much older Micrel KX8995XA switch. The old drivers referce to "KS8995" was actually KS8995XA only, it never supported the sibling devices KS8995E or KS8995MA. This is reflected in this patch set. Add new compatibles, add special code paths for the KSZ8995XA and add a new tagger for the special front tag found in the KSZ8995XA. The patches were tested with the Actiontec MI424WR rev D (which has the KS8995XA) and OpenWrt as userspace. Signed-off-by: Linus Walleij <linusw@kernel.org> --- Changes in v6: - Provide a prompt along with the transition symbol NET_DSA_KS8995 so that oldconfig works. - Clarify in commit message that the platform data probe path is unused in the kernel and it is fine to delete this mechanism. - Link to v5: https://patch.msgid.link/20260604-ks8995-to-ksz8-v5-0-98baeb45e665@kernel.org Changes in v5: - Rebase on net-next again to be sure we apply. - Fix the codepath where DCB was set up per-port, damaging KS8995XA port registers. - Fix up the transitional symbol NET_DSA_KS8995 to depend on SPI and select both NET_DSA_MICROCHIP_KSZ_COMMON and NET_DSA_MICROCHIP_KSZ_SPI. - Link to v4: https://patch.msgid.link/20260603-ks8995-to-ksz8-v4-0-e15149ef21e7@kernel.org Changes in v4: - Create a stub symbol for NET_DSA_KS8995 to phase over users to the new driver. - Link to v3: https://patch.msgid.link/20260526-ks8995-to-ksz8-v3-0-c530f651989f@kernel.org Changes in v3: - Rebase on net-next again, moving target! - Fix a netdev_info() print in the tagger to be netdev_debug() - Add net/dsa/tag_ks8995.c to MAINTAINERS - Link to v2: https://patch.msgid.link/20260522-ks8995-to-ksz8-v2-0-5712c0dc9e75@kernel.org Changes in v2: - Avoid trying to configure TOS priority settings (DCB) on the KSZ8995XA. It does have some support for this, but let's add that later. - Pick up Krzysztof's ACK on the new DT bindings. - Reset the KSZ8995XA by disabling and enabling the switch like the old driver does. - Move mutually exclusive Kconfig over to the patch introducing the old Micrel compatibles to the Microchip ksz_spi driver. (this complaint from Sashiko.) - Use __be16 instead of u16 when casting into the SKB in the tagger (this complaint from Sashiko.) - Do not modify the hdr->h_vlan_TCI if no hardware accelerated tag is detected, it would get nullified. Use whatever the Linux network stack assigned to TCI there. (this complaint from Sashiko.) - Avoid dereference of NULL in debug prints in the tagger. (this complaint from Sashiko.) - Ignored comment: Sashiko complains about ilog2(0) being potentially undefined but that is clearly defined as 0 in the Linux kernel. - Link to v1: https://patch.msgid.link/20260516-ks8995-to-ksz8-v1-0-70d0ef4aa5f4@kernel.org --- Linus Walleij (5): net: dsa: microchip: Add fallback Micrel compatibles dt-bindings: net: dsa: microchip: Add KSZ8995XA net: dsa: tag_ks8995: Add the KS8995 tag handling net: dsa: microchip: Support Microchip KSZ8995XA / KS8995XA net: dsa: ks8995: Delete surplus driver .../devicetree/bindings/net/dsa/microchip,ksz.yaml | 1 + MAINTAINERS | 1 + drivers/net/dsa/Kconfig | 9 +- drivers/net/dsa/Makefile | 1 - drivers/net/dsa/ks8995.c | 857 --------------------- drivers/net/dsa/microchip/Kconfig | 1 + drivers/net/dsa/microchip/ksz8.c | 177 ++++- drivers/net/dsa/microchip/ksz8.h | 2 + drivers/net/dsa/microchip/ksz8_reg.h | 7 + drivers/net/dsa/microchip/ksz_common.c | 58 +- drivers/net/dsa/microchip/ksz_common.h | 11 +- drivers/net/dsa/microchip/ksz_spi.c | 33 +- include/linux/platform_data/microchip-ksz.h | 1 + include/net/dsa.h | 2 + net/dsa/Kconfig | 6 + net/dsa/Makefile | 1 + net/dsa/tag_ks8995.c | 132 ++++ 17 files changed, 400 insertions(+), 900 deletions(-) --- base-commit: c1c3d01e3a9038d3e8f497e773e1f7b5d6b8212a change-id: 20260509-ks8995-to-ksz8-15f3f9c8271f Best regards, -- Linus Walleij [off-list ref]