Skip to contentSkip to conversation

net: dsa: microchip: ptp: add one more PTP dependency

PATCH In review Arnd Bergmann 3 participants 3 messages Jan 27, 2023 – Jan 28, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: microchip: ptp: add one more PTP dependency

From: Arnd Bergmann <[email protected]>

When only NET_DSA_MICROCHIP_KSZ8863_SMI is built-in but PTP is a loadable module, the ksz_ptp support still causes a link failure:

ld.lld-16: error: undefined symbol: ptp_clock_index

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

referenced by ksz_ptp.c
drivers/net/dsa/microchip/ksz_ptp.o:(ksz_get_ts_info) in archive vmlinux.a

Add the same dependency here that exists with the KSZ9477_I2C and KSZ_SPI drivers.

Fixes eac1ea20261e ("net: dsa: microchip: ptp: add the posix clock support")
---
 drivers/net/dsa/microchip/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/net/dsa/microchip/Kconfig +1 -0
index 0546c573668a..11920939b6d8 100644
@@ -36,6 +36,7 @@ config NET_DSA_MICROCHIP_KSZ_PTP
 config NET_DSA_MICROCHIP_KSZ8863_SMI
 	tristate "KSZ series SMI connected switch driver"
 	depends on NET_DSA_MICROCHIP_KSZ_COMMON
+	depends on PTP_1588_CLOCK_OPTIONAL
 	select MDIO_BITBANG
 	help
 	  Select to enable support for registering switches configured through
Signature · 1 line
2.39.0
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

When only NET_DSA_MICROCHIP_KSZ8863_SMI is built-in but PTP is a loadable module, the ksz_ptp support still causes a link failure:

ld.lld-16: error: undefined symbol: ptp_clock_index

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

referenced by ksz_ptp.c
drivers/net/dsa/microchip/ksz_ptp.o:(ksz_get_ts_info) in archive vmlinux.a

Add the same dependency here that exists with the KSZ9477_I2C and KSZ_SPI drivers.

Fixes eac1ea20261e ("net: dsa: microchip: ptp: add the posix clock support")
#2 lore raw
Quoted 11 lines · Richard Cochran
Quoted 10 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

When only NET_DSA_MICROCHIP_KSZ8863_SMI is built-in but PTP is a loadable module, the ksz_ptp support still causes a link failure:

ld.lld-16: error: undefined symbol: ptp_clock_index

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

referenced by ksz_ptp.c
drivers/net/dsa/microchip/ksz_ptp.o:(ksz_get_ts_info) in archive vmlinux.a

Quoted 7 lines
Quoted 5 lines

Add the same dependency here that exists with the KSZ9477_I2C and KSZ_SPI drivers.

Fixes eac1ea20261e ("net: dsa: microchip: ptp: add the posix clock support")

The randconfig builder just found another regression in the same driver, I'll have to send a new version, so please disregard this one for now.

Arnd