mirror-linux/drivers/net
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
..
arcnet
bonding bonding: assign random address if device address is same as bond 2025-04-28 12:37:54 +01:00
caif
can can: rockchip_canfd: fix broken quirks checks 2025-04-15 12:23:10 +02:00
dsa Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-01 15:11:38 -07:00
ethernet net: phy: factor out provider part from mdio_bus.c 2025-05-01 18:03:29 -07:00
fddi
fjes
hamradio
hippi
hyperv
ieee802154
ipa
ipvlan
mctp
mdio net: phy: factor out provider part from mdio_bus.c 2025-05-01 18:03:29 -07:00
netdevsim netdevsim: Mark NAPI ID on skb in nsim_rcv 2025-04-24 18:30:01 -07:00
ovpn ovpn: add basic ethtool support 2025-04-17 12:30:03 +02:00
pcs
phy net: phy: factor out provider part from mdio_bus.c 2025-05-01 18:03:29 -07:00
plip
ppp ppp: Split ppp_exit_net() to ->exit_rtnl(). 2025-04-22 19:07:41 -07:00
pse-pd
slip
team
thunderbolt
usb r8152: use SHA-256 library API instead of crypto_shash API 2025-05-01 17:59:32 -07:00
vmxnet3 vmxnet3: Fix malformed packet sizing in vmxnet3_process_xdp 2025-04-25 17:24:07 -07:00
vxlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-04-24 11:20:52 -07:00
wan
wireguard
wireless Some more fixes, notably: 2025-04-24 11:10:57 -07:00
wwan
xen-netback
Kconfig ovpn: implement TCP transport 2025-04-17 12:30:03 +02:00
LICENSE.SRC
Makefile net: introduce OpenVPN Data Channel Offload (ovpn) 2025-04-17 12:30:02 +02:00
Space.c
amt.c
bareudp.c bareudp: Convert bareudp_exit_batch_rtnl() to ->exit_rtnl(). 2025-04-14 17:08:44 -07:00
dummy.c
eql.c
geneve.c geneve: Convert geneve_exit_batch_rtnl() to ->exit_rtnl(). 2025-04-14 17:08:44 -07:00
gtp.c gtp: Convert gtp_net_exit_batch_rtnl() to ->exit_rtnl(). 2025-04-14 17:08:44 -07:00
ifb.c
loopback.c
macsec.c
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
netkit.c
nlmon.c
ntb_netdev.c
pfcp.c pfcp: Convert pfcp_net_exit() to ->exit_rtnl(). 2025-04-22 19:07:41 -07:00
rionet.c
sungem_phy.c
tap.c
tun.c
tun_vnet.h
veth.c veth: apply qdisc backpressure on full ptr_ring to reduce TX drops 2025-04-28 14:06:58 -07:00
virtio_net.c virtio-net: disable delayed refill when pausing rx 2025-04-22 18:29:13 -07:00
vrf.c net: sched: generalize check for no-queue qdisc on TX queue 2025-04-28 14:06:58 -07:00
vsockmon.c
xen-netfront.c xen-netfront: handle NULL returned by xdp_convert_buff_to_frame() 2025-04-21 18:56:46 -07:00