From: Arnd Bergmann <arnd@kernel.org>
To: Daniel Machon <daniel.machon@microchip.com>,
UNGLinuxDriver@microchip.com, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Steen Hegelund <Steen.Hegelund@microchip.com>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
"Jens Emil Schulz Østergaard"
<jensemil.schulzostergaard@microchip.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next] net: sparx5: add missing lan969x Kconfig dependency
Date: Wed, 13 Nov 2024 12:55:08 +0100 [thread overview]
Message-ID: <20241113115513.4132548-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
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.
Fixes: 98a01119608d ("net: sparx5: add compatible string for lan969x")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
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(-)
diff --git a/drivers/net/ethernet/microchip/lan969x/Kconfig b/drivers/net/ethernet/microchip/lan969x/Kconfig
index 728180d3fa33..c5c6122ae2ec 100644
--- a/drivers/net/ethernet/microchip/lan969x/Kconfig
+++ b/drivers/net/ethernet/microchip/lan969x/Kconfig
@@ -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.
diff --git a/drivers/net/ethernet/microchip/lan969x/Makefile b/drivers/net/ethernet/microchip/lan969x/Makefile
index 9a2351b4f111..316405cbbc71 100644
--- a/drivers/net/ethernet/microchip/lan969x/Makefile
+++ b/drivers/net/ethernet/microchip/lan969x/Makefile
@@ -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
--
2.39.5
next reply other threads:[~2024-11-13 11:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 11:55 Arnd Bergmann [this message]
2024-11-13 19:56 ` [PATCH net-next] net: sparx5: add missing lan969x Kconfig dependency Daniel Machon
2024-11-15 3:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241113115513.4132548-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=Steen.Hegelund@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=arnd@arndb.de \
--cc=daniel.machon@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jensemil.schulzostergaard@microchip.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).