562c65486c
When NET_DSA_MICROCHIP_KSZ_COMMON 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 >>> referenced by ksz_ptp.c >>> drivers/net/dsa/microchip/ksz_ptp.o:(ksz_get_ts_info) in archive vmlinux.a This can happen if NET_DSA_MICROCHIP_KSZ8863_SMI is enabled, or even if none of the KSZ9477_I2C/KSZ_SPI/KSZ8863_SMI ones are active but only the common module is. The most straightforward way to address this is to move the dependency to NET_DSA_MICROCHIP_KSZ_PTP itself, which can now only be enabled if both PTP_1588_CLOCK support is reachable from NET_DSA_MICROCHIP_KSZ_COMMON. Alternatively, one could make NET_DSA_MICROCHIP_KSZ_COMMON a hidden Kconfig symbol and extend the PTP_1588_CLOCK_OPTIONAL dependency to NET_DSA_MICROCHIP_KSZ8863_SMI as well, but that is a little more fragile. Fixes: eac1ea20261e ("net: dsa: microchip: ptp: add the posix clock support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230130131808.1084796-1-arnd@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
menuconfig NET_DSA_MICROCHIP_KSZ_COMMON
|
|
tristate "Microchip KSZ8795/KSZ9477/LAN937x series switch support"
|
|
depends on NET_DSA
|
|
select NET_DSA_TAG_KSZ
|
|
select NET_DSA_TAG_NONE
|
|
help
|
|
This driver adds support for Microchip KSZ9477 series switch and
|
|
KSZ8795/KSZ88x3 switch chips.
|
|
|
|
config NET_DSA_MICROCHIP_KSZ9477_I2C
|
|
tristate "KSZ series I2C connected switch driver"
|
|
depends on NET_DSA_MICROCHIP_KSZ_COMMON && I2C
|
|
select REGMAP_I2C
|
|
help
|
|
Select to enable support for registering switches configured through I2C.
|
|
|
|
config NET_DSA_MICROCHIP_KSZ_SPI
|
|
tristate "KSZ series SPI connected switch driver"
|
|
depends on NET_DSA_MICROCHIP_KSZ_COMMON && SPI
|
|
select REGMAP_SPI
|
|
help
|
|
Select to enable support for registering switches configured through SPI.
|
|
|
|
config NET_DSA_MICROCHIP_KSZ_PTP
|
|
bool "Support for the PTP clock on the KSZ9563/LAN937x Ethernet Switch"
|
|
depends on NET_DSA_MICROCHIP_KSZ_COMMON && PTP_1588_CLOCK
|
|
depends on NET_DSA_MICROCHIP_KSZ_COMMON=m || PTP_1588_CLOCK=y
|
|
help
|
|
Select to enable support for timestamping & PTP clock manipulation in
|
|
KSZ8563/KSZ9563/LAN937x series of switches. KSZ9563/KSZ8563 supports
|
|
only one step timestamping. LAN937x switch supports both one step and
|
|
two step timestamping.
|
|
|
|
config NET_DSA_MICROCHIP_KSZ8863_SMI
|
|
tristate "KSZ series SMI connected switch driver"
|
|
depends on NET_DSA_MICROCHIP_KSZ_COMMON
|
|
select MDIO_BITBANG
|
|
help
|
|
Select to enable support for registering switches configured through
|
|
Microchip SMI. It supports the KSZ8863 and KSZ8873 switch.
|