]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net: phy: broadcom: Add power down exit reset state delay
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 11 Mar 2021 04:53:42 +0000 (20:53 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Mar 2021 02:25:19 +0000 (18:25 -0800)
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")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/broadcom.c

index fa0be591ae79b6b88dc22ca93ea985506953c194..ad51f188943507d2c5bc1d29a30778e7c8e18c17 100644 (file)
@@ -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);
 }