]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: dwmac-sun8i: Balance internal PHY power
authorSamuel Holland <samuel@sholland.org>
Sun, 3 Jan 2021 11:17:43 +0000 (05:17 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jan 2021 00:32:08 +0000 (16:32 -0800)
commit93ae11cf9f02985cdb2b376f003808aaad83fddf
tree69c3157871105eb3434fce67ebfb1efcf55110cc
parent623447612e6072bef751f85847b12faf81ca3b8e
net: stmmac: dwmac-sun8i: Balance internal PHY power

sun8i_dwmac_exit calls sun8i_dwmac_unpower_internal_phy, but
sun8i_dwmac_init did not call sun8i_dwmac_power_internal_phy. This
caused PHY power to remain off after a suspend/resume cycle. Fix this by
recording if PHY power should be restored, and if so, restoring it.

Fixes: bb7ec09baf93 ("net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs")
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c