]> 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)
commit239821cecd7ebad1c73f76a4112a8351918c43a4
tree69c3157871105eb3434fce67ebfb1efcf55110cc
parente48158ce5734781aef63c907e8feded311ab6d8b
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: b1a2a9eb0a76 ("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