]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mdio: fix CONFIG_MDIO_DEVRES selects
authorArnd Bergmann <arnd@arndb.de>
Fri, 25 Apr 2025 11:27:56 +0000 (13:27 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 28 Apr 2025 21:04:13 +0000 (14:04 -0700)
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>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Link: https://patch.msgid.link/20250425112819.1645342-1-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/enetc/Kconfig
drivers/net/mdio/Kconfig

index 6c2779047dcd5fc6205df472dbbdca04beeb1a7d..5367e8af1e1a0cae4211c3c04389d0f63d27e29c 100644 (file)
@@ -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.
index 38a4901da32f3969de0289740b0a29b4ce854543..f680ed676797362995c2ff35727abc1ef070fa58 100644 (file)
@@ -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.