Skip to content

Commit 30dc587

Browse files
Russell King (Oracle)kuba-moo
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Russell King (Oracle) <[email protected]> [rgantois: commit log] Signed-off-by: Romain Gantois <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 58329b0 commit 30dc587

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/phy/qcom/at803x.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ static int at803x_hibernation_mode_config(struct phy_device *phydev)
426426
/* The default after hardware reset is hibernation mode enabled. After
427427
* software reset, the value is retained.
428428
*/
429-
if (!(priv->flags & AT803X_DISABLE_HIBERNATION_MODE))
429+
if (!(priv->flags & AT803X_DISABLE_HIBERNATION_MODE) &&
430+
!(phydev->dev_flags & PHY_F_RXC_ALWAYS_ON))
430431
return 0;
431432

432433
return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_HIB_CTRL,

0 commit comments

Comments
 (0)