kernel_samsung_a53x/drivers/net
Oleksij Rempel f93e3153c5 net: macb: Avoid 20s boot delay by skipping MDIO bus registration for fixed-link PHY
commit d0c3601f2c4e12e7689b0f46ebc17525250ea8c3 upstream.

A boot delay was introduced by commit 79540d133ed6 ("net: macb: Fix
handling of fixed-link node"). This delay was caused by the call to
`mdiobus_register()` in cases where a fixed-link PHY was present. The
MDIO bus registration triggered unnecessary PHY address scans, leading
to a 20-second delay due to attempts to detect Clause 45 (C45)
compatible PHYs, despite no MDIO bus being attached.

The commit 79540d133ed6 ("net: macb: Fix handling of fixed-link node")
was originally introduced to fix a regression caused by commit
7897b071ac3b4 ("net: macb: convert to phylink"), which caused the driver
to misinterpret fixed-link nodes as PHY nodes. This resulted in warnings
like:
mdio_bus f0028000.ethernet-ffffffff: fixed-link has invalid PHY address
mdio_bus f0028000.ethernet-ffffffff: scan phy fixed-link at address 0
...
mdio_bus f0028000.ethernet-ffffffff: scan phy fixed-link at address 31

This patch reworks the logic to avoid registering and allocation of the
MDIO bus when:
  - The device tree contains a fixed-link node.
  - There is no "mdio" child node in the device tree.

If a child node named "mdio" exists, the MDIO bus will be registered to
support PHYs  attached to the MACB's MDIO bus. Otherwise, with only a
fixed-link, the MDIO bus is skipped.

Tested on a sama5d35 based system with a ksz8863 switch attached to
macb0.

Fixes: 79540d133ed6 ("net: macb: Fix handling of fixed-link node")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: stable@vger.kernel.org
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241013052916.3115142-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:21:54 +01:00
..
appletalk
arcnet
bonding bonding: fix xfrm state handling when clearing active slave 2024-11-23 23:20:48 +01:00
caif
can can: m_can: m_can_close(): stop clocks after device has been shut down 2024-11-23 23:21:18 +01:00
dropdump
dsa net: dsa: microchip: fix build warning 2024-11-23 23:21:54 +01:00
ethernet net: macb: Avoid 20s boot delay by skipping MDIO bus registration for fixed-link PHY 2024-11-23 23:21:54 +01:00
fddi
fjes
hamradio
hippi
hyperv
ieee802154 net: ieee802154: mcr20a: Use IRQF_NO_AUTOEN flag in request_irq() 2024-11-23 23:21:35 +01:00
ipa
ipvlan ipvlan: Dont Use skb->sk in ipvlan_process_v{4,6}_outbound 2024-11-19 12:27:11 +01:00
mdio
netdevsim
pcs
phy net: phy: bcm84881: Fix some error handling paths 2024-11-23 23:21:51 +01:00
plip
ppp ppp: fix ppp_async_encode() illegal access 2024-11-23 23:21:52 +01:00
slip slip: make slhc_remember() more robust against malicious packets 2024-11-23 23:21:52 +01:00
team
usb usbnet: ipheth: fix carrier detection in modes 1 and 4 2024-11-23 23:21:10 +01:00
vmxnet3
vxlan vxlan: Fix regression when dropping packets due to invalid src addresses 2024-11-19 14:19:00 +01:00
wan
wimax
wireguard wireguard: send: annotate intentional data race in checking empty queue 2024-11-19 14:19:45 +01:00
wireless wifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_cmd_802_11_scan_ext() 2024-11-23 23:21:39 +01:00
xen-netback net/xen-netback: prevent UAF in xenvif_flush_hash() 2024-11-23 23:21:37 +01:00
bareudp.c bareudp: Pull inner IP header on xmit. 2024-11-23 23:21:19 +01:00
dummy.c
eql.c
geneve.c net: geneve: add missing netlink policy and size for IFLA_GENEVE_INNER_PROTO_INHERIT 2024-11-23 23:21:53 +01:00
gtp.c gtp: fix a potential NULL pointer dereference 2024-11-23 23:20:55 +01:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c net: netconsole: Disable target before netpoll cleanup 2024-11-23 23:20:12 +01:00
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c tap: add missing verification for short frame 2024-11-19 14:19:53 +01:00
thunderbolt.c
tun.c tun: add missing verification for short frame 2024-11-19 14:19:53 +01:00
veth.c
virtio_net.c virtio_net: Fix napi_skb_cache_put warning 2024-11-23 23:20:59 +01:00
vrf.c net: vrf: determine the dst using the original ifindex for multicast 2024-11-23 23:21:53 +01:00
vsockmon.c
xen-netfront.c