Skip to contentSkip to conversation

net: phy: broadcom: Add power down exit reset state delay

PATCH Applied Florian Fainelli 2 participants 2 messages Mar 11, 2021 – Mar 12, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net: phy: broadcom: Add power down exit reset state delay

Per the datasheet, when we clear the power down bit, the PHY remains in an internal reset state for 40us and then resume normal operation. Account for that delay to avoid any issues in the future if genphy_resume() changes.

Fixes fe26821fa614 ("net: phy: broadcom: Wire suspend/resume for BCM54810")

---
Changes in v2:

- make it build by using flseep()

 drivers/net/phy/broadcom.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/phy/broadcom.c +5 -0
index fa0be591ae79..ad51f1889435 100644
@@ -399,6 +399,11 @@ static int bcm54xx_resume(struct phy_device *phydev)
 	if (ret < 0)
 		return ret;
 
+	/* Upon exiting power down, the PHY remains in an internal reset state
+	 * for 40us
+	 */
+	fsleep(40);
+
 	return bcm54xx_config_init(phydev);
 }
 
Signature · 1 line
2.25.1
#1 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 9 lines · On Wed, 10 Mar 2021 20:53:42 -0800 you wrote:

Per the datasheet, when we clear the power down bit, the PHY remains in an internal reset state for 40us and then resume normal operation. Account for that delay to avoid any issues in the future if genphy_resume() changes.

Fixes fe26821fa614 ("net: phy: broadcom: Wire suspend/resume for BCM54810")

[...]

Here is the summary with links:
- [net,v2] net: phy: broadcom: Add power down exit reset state delay

    https://git.kernel.org/netdev/net/c/7a1468ba0e02

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html