]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
net: axienet: Set mac_managed_pm
authorNick Hu <nick.hu@sifive.com>
Mon, 17 Feb 2025 05:58:42 +0000 (13:58 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 20 Feb 2025 08:14:04 +0000 (09:14 +0100)
The external PHY will undergo a soft reset twice during the resume process
when it wake up from suspend. The first reset occurs when the axienet
driver calls phylink_of_phy_connect(), and the second occurs when
mdio_bus_phy_resume() invokes phy_init_hw(). The second soft reset of the
external PHY does not reinitialize the internal PHY, which causes issues
with the internal PHY, resulting in the PHY link being down. To prevent
this, setting the mac_managed_pm flag skips the mdio_bus_phy_resume()
function.

Fixes: a129b41fe0a8 ("Revert "net: phy: dp83867: perform soft reset and retain established link"")
Signed-off-by: Nick Hu <nick.hu@sifive.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250217055843.19799-1-nick.hu@sifive.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c

index 9e7fa012e4fad7fb19f980b2e3f663bd71cc5981..f33178f90c42ee491ef04797e291b6a0ed831a06 100644 (file)
@@ -2897,6 +2897,7 @@ static int axienet_probe(struct platform_device *pdev)
 
        lp->phylink_config.dev = &ndev->dev;
        lp->phylink_config.type = PHYLINK_NETDEV;
+       lp->phylink_config.mac_managed_pm = true;
        lp->phylink_config.mac_capabilities = MAC_SYM_PAUSE | MAC_ASYM_PAUSE |
                MAC_10FD | MAC_100FD | MAC_1000FD;