mirror-linux/include
Heiner Kallweit a3e1c0ad83 net: phy: factor out provider part from mdio_bus.c
After 52358dd63e ("net: phy: remove function stubs") there's a
problem if CONFIG_MDIO_BUS is set, but CONFIG_PHYLIB is not.
mdiobus_scan() uses phylib functions like get_phy_device().
Bringing back the stub wouldn't make much sense, because it would
allow to compile mdiobus_scan(), but the function would be unusable.
The stub returned NULL, and we have the following in mdiobus_scan():

phydev = get_phy_device(bus, addr, c45);
        if (IS_ERR(phydev))
                return phydev;

So calling mdiobus_scan() w/o CONFIG_PHYLIB would cause a crash later in
mdiobus_scan(). In general the PHYLIB functionality isn't optional here.
Consequently, MDIO bus providers depend on PHYLIB.
Therefore factor it out and build it together with the libphy core
modules. In addition make all MDIO bus providers under /drivers/net/mdio
depend on PHYLIB. Same applies to enetc MDIO bus provider. Note that
PHYLIB selects MDIO_DEVRES, therefore we can omit this here.

Fixes: 52358dd63e ("net: phy: remove function stubs")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202504270639.mT0lh2o1-lkp@intel.com/
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/c74772a9-dab6-44bf-a657-389df89d85c2@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-05-01 18:03:29 -07:00
..
acpi gcc-15: acpi: sprinkle random '__nonstring' crumbles around 2025-04-20 11:57:54 -07:00
asm-generic RISC-V Patches for the 6.15 Merge Window, Part 1 2025-04-04 09:49:17 -07:00
clocksource
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-04-17 12:26:50 -07:00
cxl cxl: Fix devm host device for CXL fwctl initialization 2025-04-18 09:33:04 -07:00
drm Short summary of fixes pull: 2025-04-18 08:38:29 +10:00
dt-bindings Char/Misc/IIO driver updates for 6.15-rc1 2025-04-01 11:26:08 -07:00
hyperv
keys rxrpc: Add YFS RxGK (GSSAPI) security class 2025-04-14 17:36:41 -07:00
kunit kunit: Spelling s/slowm/slow/ 2025-04-08 14:57:24 -06:00
kvm
linux net: phy: factor out provider part from mdio_bus.c 2025-05-01 18:03:29 -07:00
math-emu
media
memory
misc
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-01 15:11:38 -07:00
pcmcia
ras
rdma RDMA/mlx5: Fix compilation warning when USER_ACCESS isn't set 2025-04-07 15:14:34 -03:00
rv
scsi
soc
sound soundwire updates for 6.15 2025-04-01 12:43:13 -07:00
target
trace trace: tcp: Add const qualifier to skb parameter in tcp_probe event 2025-04-17 19:04:43 -07:00
uapi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-01 15:11:38 -07:00
ufs scsi: ufs: Introduce quirk to extend PA_HIBERN8TIME for UFS devices 2025-04-11 22:13:00 -04:00
vdso vdso: Address variable shadowing in macros 2025-04-10 11:07:10 +02:00
video
xen
Kbuild