]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Jan 2021 13:05:31 +0000 (14:05 +0100)
commit4ff0737ebc76ee371e75841c8db171f5a0d51f11
treed0e06be46e55192e61c6ae119565ce03124c7e7f
parent5698f0921c9b591c50c611226b099d056bc687cc
net: stmmac: dwmac-sun8i: Balance internal PHY power

[ Upstream commit b8239638853e3e37b287e4bd4d57b41f14c78550 ]

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: 634db83b8265 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c