net: phy: qcom: at803x: Avoid hibernating if MAC requires RX clock
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 26 Mar 2024 13:32:12 +0000 (14:32 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Mar 2024 02:21:34 +0000 (19:21 -0700)
commit30dc5873967ecc0282a8283622156cba4be8daf4
tree3614ca3a635eafea06b84632067e6ee24b494c0e
parent58329b03a5957904fa2b33b3824ed19e7b42c9e9
net: phy: qcom: at803x: Avoid hibernating if MAC requires RX clock

Stmmac controllers connected to an at803x PHY cannot resume properly after
suspend when WoL is enabled. This happens because the MAC requires an RX
clock generated by the PHY to initialize its hardware properly. But the RX
clock is cut when the PHY suspends and isn't brought up until the MAC
driver resumes the phylink.

Prevent the at803x PHY driver from going into suspend if the attached MAC
driver always requires an RX clock signal.

Reported-by: Clark Wang <xiaoning.wang@nxp.com>
Link: https://lore.kernel.org/all/20230202081559.3553637-1-xiaoning.wang@nxp.com/
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
[rgantois: commit log]
Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20240326-rxc_bugfix-v6-6-24a74e5c761f@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/qcom/at803x.c