linux-yocto/drivers/net/phy
Sean Anderson ec158d05ea net: phy: Don't register LEDs for genphy
[ Upstream commit f0f2b992d8 ]

If a PHY has no driver, the genphy driver is probed/removed directly in
phy_attach/detach. If the PHY's ofnode has an "leds" subnode, then the
LEDs will be (un)registered when probing/removing the genphy driver.
This could occur if the leds are for a non-generic driver that isn't
loaded for whatever reason. Synchronously removing the PHY device in
phy_detach leads to the following deadlock:

rtnl_lock()
ndo_close()
    ...
    phy_detach()
        phy_remove()
            phy_leds_unregister()
                led_classdev_unregister()
                    led_trigger_set()
                        netdev_trigger_deactivate()
                            unregister_netdevice_notifier()
                                rtnl_lock()

There is a corresponding deadlock on the open/register side of things
(and that one is reported by lockdep), but it requires a race while this
one is deterministic.

Generic PHYs do not support LEDs anyway, so don't bother registering
them.

Fixes: 01e5b728e9 ("net: phy: Add a binding for PHY LEDs")
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Link: https://patch.msgid.link/20250707195803.666097-1-sean.anderson@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-07-24 08:53:17 +02:00
..
mscc net: phy: mscc: Stop clearing the the UDPv4 checksum for L2 frames 2025-06-19 15:28:19 +02:00
adin.c
adin1100.c
amd.c
aquantia_hwmon.c
aquantia_main.c
aquantia.h
at803x.c net: phy: at803x: fix passing the wrong reference for config_intr 2024-02-05 20:14:22 +00:00
ax88796b.c
bcm-cygnus.c
bcm-phy-lib.c
bcm-phy-lib.h
bcm-phy-ptp.c
bcm7xxx.c
bcm63xx.c
bcm87xx.c
bcm54140.c
bcm84881.c net: phy: bcm84881: Fix some error handling paths 2024-10-17 15:24:24 +02:00
broadcom.c
cicada.c
cortina.c
davicom.c
dp83tc811.c
dp83td510.c
dp83640_reg.h
dp83640.c
dp83822.c net: phy: dp83822: Fix reset pin definitions 2024-11-01 01:58:33 +01:00
dp83848.c net: phy: ti: add PHY_RST_AFTER_CLK_EN flag 2024-11-14 13:19:31 +01:00
dp83867.c
dp83869.c net: phy: dp83869: fix memory corruption when enabling fiber 2024-10-17 15:24:23 +02:00
et1011c.c
fixed_phy.c
icplus.c
intel-xway.c
Kconfig
linkmode.c
lxt.c
Makefile
marvell-88q2xxx.c
marvell-88x2222.c
marvell.c
marvell10g.c
mdio_bus.c net/mdiobus: Fix potential out-of-bounds clause 45 read/write access 2025-06-19 15:28:41 +02:00
mdio_device.c
mdio_devres.c
mdio-boardinfo.c
mdio-boardinfo.h
mdio-open-alliance.h
mediatek-ge-soc.c net: phy: mediatek-ge-soc: follow netdev LED trigger semantics 2024-05-02 16:32:37 +02:00
mediatek-ge.c
meson-gxl.c
micrel.c net: phy: micrel: Fix the KSZ9131 MDI-X status issue 2024-08-11 12:47:21 +02:00
microchip_t1.c net: phy: microchip: lan87xx: reinit PHY after cable test 2024-07-18 13:21:12 +02:00
microchip_t1s.c
microchip.c net: phy: microchip: limit 100M workaround to link-down events on LAN88xx 2025-07-17 18:35:19 +02:00
mii_timestamper.c
motorcomm.c
mxl-gpy.c net: phy: mxl-gpy: Remove interrupt mask clearing from config_init 2024-06-27 13:49:07 +02:00
national.c
ncn26000.c
nxp-c45-tja11xx.c net: phy: c45-tjaxx: add delay between MDIO write and read in soft_reset 2025-02-17 09:40:39 +01:00
nxp-cbtx.c
nxp-tja11xx.c
phy_device.c net: phy: Don't register LEDs for genphy 2025-07-24 08:53:17 +02:00
phy_led_triggers.c net: phy: leds: fix memory leak 2025-05-02 07:50:43 +02:00
phy-c45.c
phy-core.c
phy.c
phylink.c net: phylink: use pl->link_interface in phylink_expects_phy() 2025-06-04 14:42:02 +02:00
qsemi.c
realtek.c net: phy: realtek: add support for RTL8366S Gigabit PHY 2024-08-11 12:47:19 +02:00
rockchip.c
sfp-bus.c net: sfp-bus: fix SFP mode detect from bitrate 2024-06-16 13:47:30 +02:00
sfp.c net: sfp: add quirk for 2.5G OEM BX SFP 2025-04-25 10:45:15 +02:00
sfp.h
smsc.c net: phy: smsc: Fix link failure in forced mode with Auto-MDIX 2025-07-17 18:35:10 +02:00
spi_ks8995.c
ste10Xp.c
stubs.c
swphy.c
swphy.h
teranetics.c
uPD60620.c
vitesse.c net: phy: vitesse: repair vsc73xx autonegotiation 2024-09-18 19:24:05 +02:00
xilinx_gmii2rgmii.c