diff mbox series

net: dsa: ocelot: add PTP dependency for NET_DSA_MSCC_OCELOT_EXT

Message ID 20230209124435.1317781-1-arnd@kernel.org (mailing list archive)
State Accepted
Commit f99f22e02f298083763b78a58cf82903d5e2d272
Delegated to: Netdev Maintainers
Headers show
Series net: dsa: ocelot: add PTP dependency for NET_DSA_MSCC_OCELOT_EXT | 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, 14 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 Feb. 9, 2023, 12:44 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

A new user of MSCC_OCELOT_SWITCH_LIB was added, bringing back an old
link failure that was fixed with e5f31552674e ("ethernet: fix
PTP_1588_CLOCK dependencies"):

x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_ptp_enable':
ocelot_ptp.c:(.text+0x8ee): undefined reference to `ptp_find_pin'
x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_get_ts_info':
ocelot_ptp.c:(.text+0xd5d): undefined reference to `ptp_clock_index'
x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_init_timestamp':
ocelot_ptp.c:(.text+0x15ca): undefined reference to `ptp_clock_register'
x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_deinit_timestamp':
ocelot_ptp.c:(.text+0x16b7): undefined reference to `ptp_clock_unregister'

Add the same PTP dependency here, as well as in the MSCC_OCELOT_SWITCH_LIB
symbol itself to make it more obvious what is going on when the next
driver selects it.

Fixes: 3d7316ac81ac ("net: dsa: ocelot: add external ocelot switch control")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/dsa/ocelot/Kconfig    | 1 +
 drivers/net/ethernet/mscc/Kconfig | 1 +
 2 files changed, 2 insertions(+)

Comments

Colin Foster Feb. 9, 2023, 5:04 p.m. UTC | #1
Hi Arnd,

On Thu, Feb 09, 2023 at 01:44:17PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> A new user of MSCC_OCELOT_SWITCH_LIB was added, bringing back an old
> link failure that was fixed with e5f31552674e ("ethernet: fix
> PTP_1588_CLOCK dependencies"):
> 
> x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_ptp_enable':
> ocelot_ptp.c:(.text+0x8ee): undefined reference to `ptp_find_pin'
> x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_get_ts_info':
> ocelot_ptp.c:(.text+0xd5d): undefined reference to `ptp_clock_index'
> x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_init_timestamp':
> ocelot_ptp.c:(.text+0x15ca): undefined reference to `ptp_clock_register'
> x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_deinit_timestamp':
> ocelot_ptp.c:(.text+0x16b7): undefined reference to `ptp_clock_unregister'
> 
> Add the same PTP dependency here, as well as in the MSCC_OCELOT_SWITCH_LIB
> symbol itself to make it more obvious what is going on when the next
> driver selects it.
> 
> Fixes: 3d7316ac81ac ("net: dsa: ocelot: add external ocelot switch control")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

I think this'll have to go through net-next, because ocelot-ext hasn't
been merged yet... unless there's something I don't fully understand
(which is very likely)

Thanks for finding / fixing! I'll run a quick verification when I have
access to hardware. Probably won't be for a couple days though.

Acked-by: Colin Foster <colin.foster@in-advantage.com>
patchwork-bot+netdevbpf@kernel.org Feb. 11, 2023, 3:40 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu,  9 Feb 2023 13:44:17 +0100 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> A new user of MSCC_OCELOT_SWITCH_LIB was added, bringing back an old
> link failure that was fixed with e5f31552674e ("ethernet: fix
> PTP_1588_CLOCK dependencies"):
> 
> x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_ptp_enable':
> ocelot_ptp.c:(.text+0x8ee): undefined reference to `ptp_find_pin'
> x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_get_ts_info':
> ocelot_ptp.c:(.text+0xd5d): undefined reference to `ptp_clock_index'
> x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_init_timestamp':
> ocelot_ptp.c:(.text+0x15ca): undefined reference to `ptp_clock_register'
> x86_64-linux-ld: drivers/net/ethernet/mscc/ocelot_ptp.o: in function `ocelot_deinit_timestamp':
> ocelot_ptp.c:(.text+0x16b7): undefined reference to `ptp_clock_unregister'
> 
> [...]

Here is the summary with links:
  - net: dsa: ocelot: add PTP dependency for NET_DSA_MSCC_OCELOT_EXT
    https://git.kernel.org/netdev/net-next/c/f99f22e02f29

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/dsa/ocelot/Kconfig b/drivers/net/dsa/ocelot/Kconfig
index 640725524d0c..eff0a7dfcd21 100644
--- a/drivers/net/dsa/ocelot/Kconfig
+++ b/drivers/net/dsa/ocelot/Kconfig
@@ -12,6 +12,7 @@  config NET_DSA_MSCC_OCELOT_EXT
 	tristate "Ocelot External Ethernet switch support"
 	depends on NET_DSA && SPI
 	depends on NET_VENDOR_MICROSEMI
+	depends on PTP_1588_CLOCK_OPTIONAL
 	select MDIO_MSCC_MIIM
 	select MFD_OCELOT_CORE
 	select MSCC_OCELOT_SWITCH_LIB
diff --git a/drivers/net/ethernet/mscc/Kconfig b/drivers/net/ethernet/mscc/Kconfig
index 8dd8c7f425d2..81e605691bb8 100644
--- a/drivers/net/ethernet/mscc/Kconfig
+++ b/drivers/net/ethernet/mscc/Kconfig
@@ -13,6 +13,7 @@  if NET_VENDOR_MICROSEMI
 
 # Users should depend on NET_SWITCHDEV, HAS_IOMEM, BRIDGE
 config MSCC_OCELOT_SWITCH_LIB
+	depends on PTP_1588_CLOCK_OPTIONAL
 	select NET_DEVLINK
 	select REGMAP_MMIO
 	select PACKING