* [PATCH] mdio: fix CONFIG_MDIO_DEVRES selects
@ 2025-04-25 11:27 Arnd Bergmann
2025-04-27 20:49 ` Chris Packham
2025-04-28 22:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2025-04-25 11:27 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Heiner Kallweit, Jacob Keller, Chris Packham
Cc: Arnd Bergmann, Claudiu Manoil, Vladimir Oltean, Wei Fang,
Clark Wang, Russell King, Frank Li, imx, netdev, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The newly added rtl9300 driver needs MDIO_DEVRES:
x86_64-linux-ld: drivers/net/mdio/mdio-realtek-rtl9300.o: in function `rtl9300_mdiobus_probe':
mdio-realtek-rtl9300.c:(.text+0x941): undefined reference to `devm_mdiobus_alloc_size'
x86_64-linux-ld: mdio-realtek-rtl9300.c:(.text+0x9e2): undefined reference to `__devm_mdiobus_register'
Since this is a hidden symbol, it needs to be selected by each user,
rather than the usual 'depends on'. I see that there are a few other
drivers that accidentally use 'depends on', so fix these as well for
consistency and to avoid dependency loops.
Fixes: 37f9b2a6c086 ("net: ethernet: Add missing depends on MDIO_DEVRES")
Fixes: 24e31e474769 ("net: mdio: Add RTL9300 MDIO driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/ethernet/freescale/enetc/Kconfig | 3 ++-
drivers/net/mdio/Kconfig | 7 ++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/freescale/enetc/Kconfig b/drivers/net/ethernet/freescale/enetc/Kconfig
index 6c2779047dcd..5367e8af1e1a 100644
--- a/drivers/net/ethernet/freescale/enetc/Kconfig
+++ b/drivers/net/ethernet/freescale/enetc/Kconfig
@@ -73,7 +73,8 @@ config FSL_ENETC_IERB
config FSL_ENETC_MDIO
tristate "ENETC MDIO driver"
- depends on PCI && MDIO_DEVRES && MDIO_BUS
+ depends on PCI && MDIO_BUS
+ select MDIO_DEVRES
help
This driver supports NXP ENETC Central MDIO controller as a PCIe
physical function (PF) device.
diff --git a/drivers/net/mdio/Kconfig b/drivers/net/mdio/Kconfig
index 38a4901da32f..f680ed676797 100644
--- a/drivers/net/mdio/Kconfig
+++ b/drivers/net/mdio/Kconfig
@@ -66,7 +66,7 @@ config MDIO_ASPEED
tristate "ASPEED MDIO bus controller"
depends on ARCH_ASPEED || COMPILE_TEST
depends on OF_MDIO && HAS_IOMEM
- depends on MDIO_DEVRES
+ select MDIO_DEVRES
help
This module provides a driver for the independent MDIO bus
controllers found in the ASPEED AST2600 SoC. This is a driver for the
@@ -172,7 +172,7 @@ config MDIO_IPQ4019
tristate "Qualcomm IPQ4019 MDIO interface support"
depends on HAS_IOMEM && OF_MDIO
depends on COMMON_CLK
- depends on MDIO_DEVRES
+ select MDIO_DEVRES
help
This driver supports the MDIO interface found in Qualcomm
IPQ40xx, IPQ60xx, IPQ807x and IPQ50xx series Soc-s.
@@ -181,7 +181,7 @@ config MDIO_IPQ8064
tristate "Qualcomm IPQ8064 MDIO interface support"
depends on HAS_IOMEM && OF_MDIO
depends on MFD_SYSCON
- depends on MDIO_DEVRES
+ select MDIO_DEVRES
help
This driver supports the MDIO interface found in the network
interface units of the IPQ8064 SoC
@@ -189,6 +189,7 @@ config MDIO_IPQ8064
config MDIO_REALTEK_RTL9300
tristate "Realtek RTL9300 MDIO interface support"
depends on MACH_REALTEK_RTL || COMPILE_TEST
+ select MDIO_DEVRES
help
This driver supports the MDIO interface found in the Realtek
RTL9300 family of Ethernet switches with integrated SoC.
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mdio: fix CONFIG_MDIO_DEVRES selects
2025-04-25 11:27 [PATCH] mdio: fix CONFIG_MDIO_DEVRES selects Arnd Bergmann
@ 2025-04-27 20:49 ` Chris Packham
2025-04-28 22:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Chris Packham @ 2025-04-27 20:49 UTC (permalink / raw)
To: Arnd Bergmann, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Heiner Kallweit, Jacob Keller
Cc: Arnd Bergmann, Claudiu Manoil, Vladimir Oltean, Wei Fang,
Clark Wang, Russell King, Frank Li, imx@lists.linux.dev,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Hi Arnd,
On 25/04/2025 23:27, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The newly added rtl9300 driver needs MDIO_DEVRES:
>
> x86_64-linux-ld: drivers/net/mdio/mdio-realtek-rtl9300.o: in function `rtl9300_mdiobus_probe':
> mdio-realtek-rtl9300.c:(.text+0x941): undefined reference to `devm_mdiobus_alloc_size'
> x86_64-linux-ld: mdio-realtek-rtl9300.c:(.text+0x9e2): undefined reference to `__devm_mdiobus_register'
> Since this is a hidden symbol, it needs to be selected by each user,
> rather than the usual 'depends on'. I see that there are a few other
> drivers that accidentally use 'depends on', so fix these as well for
> consistency and to avoid dependency loops.
>
> Fixes: 37f9b2a6c086 ("net: ethernet: Add missing depends on MDIO_DEVRES")
> Fixes: 24e31e474769 ("net: mdio: Add RTL9300 MDIO driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks for catching this
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
> drivers/net/ethernet/freescale/enetc/Kconfig | 3 ++-
> drivers/net/mdio/Kconfig | 7 ++++---
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/enetc/Kconfig b/drivers/net/ethernet/freescale/enetc/Kconfig
> index 6c2779047dcd..5367e8af1e1a 100644
> --- a/drivers/net/ethernet/freescale/enetc/Kconfig
> +++ b/drivers/net/ethernet/freescale/enetc/Kconfig
> @@ -73,7 +73,8 @@ config FSL_ENETC_IERB
>
> config FSL_ENETC_MDIO
> tristate "ENETC MDIO driver"
> - depends on PCI && MDIO_DEVRES && MDIO_BUS
> + depends on PCI && MDIO_BUS
> + select MDIO_DEVRES
> help
> This driver supports NXP ENETC Central MDIO controller as a PCIe
> physical function (PF) device.
> diff --git a/drivers/net/mdio/Kconfig b/drivers/net/mdio/Kconfig
> index 38a4901da32f..f680ed676797 100644
> --- a/drivers/net/mdio/Kconfig
> +++ b/drivers/net/mdio/Kconfig
> @@ -66,7 +66,7 @@ config MDIO_ASPEED
> tristate "ASPEED MDIO bus controller"
> depends on ARCH_ASPEED || COMPILE_TEST
> depends on OF_MDIO && HAS_IOMEM
> - depends on MDIO_DEVRES
> + select MDIO_DEVRES
> help
> This module provides a driver for the independent MDIO bus
> controllers found in the ASPEED AST2600 SoC. This is a driver for the
> @@ -172,7 +172,7 @@ config MDIO_IPQ4019
> tristate "Qualcomm IPQ4019 MDIO interface support"
> depends on HAS_IOMEM && OF_MDIO
> depends on COMMON_CLK
> - depends on MDIO_DEVRES
> + select MDIO_DEVRES
> help
> This driver supports the MDIO interface found in Qualcomm
> IPQ40xx, IPQ60xx, IPQ807x and IPQ50xx series Soc-s.
> @@ -181,7 +181,7 @@ config MDIO_IPQ8064
> tristate "Qualcomm IPQ8064 MDIO interface support"
> depends on HAS_IOMEM && OF_MDIO
> depends on MFD_SYSCON
> - depends on MDIO_DEVRES
> + select MDIO_DEVRES
> help
> This driver supports the MDIO interface found in the network
> interface units of the IPQ8064 SoC
> @@ -189,6 +189,7 @@ config MDIO_IPQ8064
> config MDIO_REALTEK_RTL9300
> tristate "Realtek RTL9300 MDIO interface support"
> depends on MACH_REALTEK_RTL || COMPILE_TEST
> + select MDIO_DEVRES
> help
> This driver supports the MDIO interface found in the Realtek
> RTL9300 family of Ethernet switches with integrated SoC.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mdio: fix CONFIG_MDIO_DEVRES selects
2025-04-25 11:27 [PATCH] mdio: fix CONFIG_MDIO_DEVRES selects Arnd Bergmann
2025-04-27 20:49 ` Chris Packham
@ 2025-04-28 22:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-04-28 22:20 UTC (permalink / raw)
To: Arnd Bergmann
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, hkallweit1,
jacob.e.keller, chris.packham, arnd, claudiu.manoil,
vladimir.oltean, wei.fang, xiaoning.wang, linux, Frank.Li, imx,
netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 25 Apr 2025 13:27:56 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The newly added rtl9300 driver needs MDIO_DEVRES:
>
> x86_64-linux-ld: drivers/net/mdio/mdio-realtek-rtl9300.o: in function `rtl9300_mdiobus_probe':
> mdio-realtek-rtl9300.c:(.text+0x941): undefined reference to `devm_mdiobus_alloc_size'
> x86_64-linux-ld: mdio-realtek-rtl9300.c:(.text+0x9e2): undefined reference to `__devm_mdiobus_register'
> Since this is a hidden symbol, it needs to be selected by each user,
> rather than the usual 'depends on'. I see that there are a few other
> drivers that accidentally use 'depends on', so fix these as well for
> consistency and to avoid dependency loops.
>
> [...]
Here is the summary with links:
- mdio: fix CONFIG_MDIO_DEVRES selects
https://git.kernel.org/netdev/net-next/c/ccc25158c22b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-28 22:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-25 11:27 [PATCH] mdio: fix CONFIG_MDIO_DEVRES selects Arnd Bergmann
2025-04-27 20:49 ` Chris Packham
2025-04-28 22:20 ` patchwork-bot+netdevbpf
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).