net: sparx5: add missing lan969x Kconfig dependency
Subsystems (2)
PATCH 1/1 net: sparx5: add missing lan969x Kconfig dependency
From: Arnd Bergmann <[email protected]>
The sparx5 switchdev driver can be built either with or without support for the Lan969x switch. However, it cannot be built-in when the lan969x driver is a loadable module because of a link-time dependency:
arm-linux-gnueabi-ld: drivers/net/ethernet/microchip/sparx5/sparx5_main.o:(.rodata+0xd44): undefined reference to `lan969x_desc'
Add a Kconfig dependency to reflect this in Kconfig, allowing all the valid configurations but forcing sparx5 to be a loadable module as well if lan969x is.
---
Side note: given that lan969x is always built as part of sparx5, wouldn't it make more sense to move all of it into the sparx5 subdirectory?
--- drivers/net/ethernet/microchip/lan969x/Kconfig | 2 +- drivers/net/ethernet/microchip/lan969x/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/microchip/lan969x/Kconfig +1 -1
@@ -1,5 +1,5 @@ config LAN969X_SWITCH - tristate "Lan969x switch driver" + bool "Lan969x switch driver" depends on SPARX5_SWITCH help This driver supports the lan969x family of network switch devices.
drivers/net/ethernet/microchip/lan969x/Makefile +1 -1
@@ -3,7 +3,7 @@ # Makefile for the Microchip lan969x network device drivers. # -obj-$(CONFIG_LAN969X_SWITCH) += lan969x-switch.o +obj-$(CONFIG_SPARX5_SWITCH) += lan969x-switch.o lan969x-switch-y := lan969x_regs.o lan969x.o lan969x_calendar.o \ lan969x_vcap_ag_api.o lan969x_vcap_impl.o
Signature · 1 line
2.39.5
Hi Arnd,
Quoted 11 lines
From: Arnd Bergmann <[email protected]>
The sparx5 switchdev driver can be built either with or without support for the Lan969x switch. However, it cannot be built-in when the lan969x driver is a loadable module because of a link-time dependency:
arm-linux-gnueabi-ld: drivers/net/ethernet/microchip/sparx5/sparx5_main.o:(.rodata+0xd44): undefined reference to `lan969x_desc'
Add a
Kconfigdependency to reflect this inKconfig, allowing all the valid configurations but forcing sparx5 to be a loadable module as well if lan969x is.
Checked the different configurations and the change fixed it. Thanks!
Quoted 8 lines
Fixes 98a01119608d ("net: sparx5: add compatible string for lan969x")Signed-off-by Arnd Bergmann <[email protected]>---
Side note: given that lan969x is always built as part of sparx5, wouldn't it make more sense to move all of it into the sparx5 subdirectory?
---
IDK .. I think I prefer it *not* being hidden under the sparx5 dir. If we have any guidelines for this, I will gladly comply. :-)
/Daniel
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Wed, 13 Nov 2024 12:55:08 +0100 you wrote:
From: Arnd Bergmann <[email protected]>
The sparx5 switchdev driver can be built either with or without support for the Lan969x switch. However, it cannot be built-in when the lan969x driver is a loadable module because of a link-time dependency:
arm-linux-gnueabi-ld: drivers/net/ethernet/microchip/sparx5/sparx5_main.o:(.rodata+0xd44): undefined reference to `lan969x_desc'
[...]
Here is the summary with links:
- [net-next] net: sparx5: add missing lan969x Kconfig dependency
https://git.kernel.org/netdev/net-next/c/4c54e9497d9a
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html