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

net: phy: Do not shutdown PHYs in READY state

In case a PHY device was probed thus in the PHY_READY state, but not
configured and with no network device attached yet, we should not be
trying to shut it down because it has been brought back into reset by
phy_device_reset() towards the end of phy_probe() and anyway we have not
configured the PHY yet.

Fixes: e2f016cf7751 ("net: phy: add a shutdown procedure")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Florian Fainelli and committed by
David S. Miller
f4982393 a5a14ea7

+3
+3
drivers/net/phy/phy_device.c
··· 3125 3125 { 3126 3126 struct phy_device *phydev = to_phy_device(dev); 3127 3127 3128 + if (phydev->state == PHY_READY || !phydev->attached_dev) 3129 + return; 3130 + 3128 3131 phy_disable_interrupts(phydev); 3129 3132 } 3130 3133