Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mdio: fix CONFIG_MDIO_DEVRES selects

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>

authored by

Arnd Bergmann and committed by
Jakub Kicinski
ccc25158 7bc4fa66

+6 -4
+2 -1
drivers/net/ethernet/freescale/enetc/Kconfig
··· 73 73 74 74 config FSL_ENETC_MDIO 75 75 tristate "ENETC MDIO driver" 76 - depends on PCI && MDIO_DEVRES && MDIO_BUS 76 + depends on PCI && MDIO_BUS 77 + select MDIO_DEVRES 77 78 help 78 79 This driver supports NXP ENETC Central MDIO controller as a PCIe 79 80 physical function (PF) device.
+4 -3
drivers/net/mdio/Kconfig
··· 66 66 tristate "ASPEED MDIO bus controller" 67 67 depends on ARCH_ASPEED || COMPILE_TEST 68 68 depends on OF_MDIO && HAS_IOMEM 69 - depends on MDIO_DEVRES 69 + select MDIO_DEVRES 70 70 help 71 71 This module provides a driver for the independent MDIO bus 72 72 controllers found in the ASPEED AST2600 SoC. This is a driver for the ··· 172 172 tristate "Qualcomm IPQ4019 MDIO interface support" 173 173 depends on HAS_IOMEM && OF_MDIO 174 174 depends on COMMON_CLK 175 - depends on MDIO_DEVRES 175 + select MDIO_DEVRES 176 176 help 177 177 This driver supports the MDIO interface found in Qualcomm 178 178 IPQ40xx, IPQ60xx, IPQ807x and IPQ50xx series Soc-s. ··· 181 181 tristate "Qualcomm IPQ8064 MDIO interface support" 182 182 depends on HAS_IOMEM && OF_MDIO 183 183 depends on MFD_SYSCON 184 - depends on MDIO_DEVRES 184 + select MDIO_DEVRES 185 185 help 186 186 This driver supports the MDIO interface found in the network 187 187 interface units of the IPQ8064 SoC ··· 189 189 config MDIO_REALTEK_RTL9300 190 190 tristate "Realtek RTL9300 MDIO interface support" 191 191 depends on MACH_REALTEK_RTL || COMPILE_TEST 192 + select MDIO_DEVRES 192 193 help 193 194 This driver supports the MDIO interface found in the Realtek 194 195 RTL9300 family of Ethernet switches with integrated SoC.