[PATCH net-next v3 0/5] net: dsa: microchip: Add support for KSZ8995XA/KS8995XA
From: Linus Walleij <linusw@kernel.org>
Date: 2026-05-26 15:59:43
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 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 | 8 - drivers/net/dsa/Makefile | 1 - drivers/net/dsa/ks8995.c | 857 --------------------- drivers/net/dsa/microchip/Kconfig | 1 + drivers/net/dsa/microchip/ksz8.c | 170 +++- 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, 388 insertions(+), 904 deletions(-) --- base-commit: 18b9f739d3f292925ca7f67ad63f3a4c0bbfad3d change-id: 20260509-ks8995-to-ksz8-15f3f9c8271f Best regards, -- Linus Walleij [off-list ref]