diff mbox series

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

Message ID 20230127221323.2522421-1-arnd@kernel.org (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series net: dsa: microchip: ptp: add one more PTP dependency | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 13 of 13 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Arnd Bergmann Jan. 27, 2023, 10:13 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

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
>>> 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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/dsa/microchip/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Richard Cochran Jan. 27, 2023, 11:58 p.m. UTC | #1
On Fri, Jan 27, 2023 at 11:13:03PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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
> >>> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Richard Cochran <richardcochran@gmail.com>
Arnd Bergmann Jan. 28, 2023, 9:44 p.m. UTC | #2
On Sat, Jan 28, 2023, at 00:58, Richard Cochran wrote:
> On Fri, Jan 27, 2023 at 11:13:03PM +0100, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>> 
>> 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
>> >>> 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")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Acked-by: Richard Cochran <richardcochran@gmail.com>

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
diff mbox series

Patch

diff --git a/drivers/net/dsa/microchip/Kconfig b/drivers/net/dsa/microchip/Kconfig
index 0546c573668a..11920939b6d8 100644
--- a/drivers/net/dsa/microchip/Kconfig
+++ b/drivers/net/dsa/microchip/Kconfig
@@ -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