]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dsa: microchip: Do not execute PTP driver code for unsupported switches
authorTristram Ha <tristram.ha@microchip.com>
Tue, 2 Dec 2025 19:20:58 +0000 (14:20 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:25:03 +0000 (06:25 +0900)
commit7f0bc8f2c899571eb8a22aab8e34207828ccd960
tree079af4f2342d711a89e2acc845c0ba83d23b1d2f
parent482330f8261b4bea8146d9bd69c1199e5dfcbb5c
net: dsa: microchip: Do not execute PTP driver code for unsupported switches

[ Upstream commit 6ed3472173c575cd8aaed6c62eb74f7728404ee6 ]

The PTP driver code only works for certain KSZ switches like KSZ9477,
KSZ9567, LAN937X and their varieties.  This code is enabled by kernel
configuration CONFIG_NET_DSA_MICROCHIP_KSZ_PTP.  As the DSA driver is
common to work with all KSZ switches this PTP code is not appropriate
for other unsupported switches.  The ptp_capable indication is added to
the chip data structure to signal whether to execute those code.

Signed-off-by: Tristram Ha <tristram.ha@microchip.com>
Link: https://patch.msgid.link/20241218020240.70601-1-Tristram.Ha@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 0f80e21bf622 ("net: dsa: microchip: Free previously initialized ports on init failures")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/microchip/ksz_common.h