Commit 557d5dc8 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Jakub Kicinski

net: fec: use mac-managed PHY PM

Use the new mac_managed_pm flag to work around an issue with KSZ8081 PHY
that becomes unstable when a soft reset is triggered during aneg.
Reported-by: default avatarJoakim Zhang <qiangqing.zhang@nxp.com>
Tested-by: default avatarJoakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent fba863b8
...@@ -2048,6 +2048,8 @@ static int fec_enet_mii_probe(struct net_device *ndev) ...@@ -2048,6 +2048,8 @@ static int fec_enet_mii_probe(struct net_device *ndev)
fep->link = 0; fep->link = 0;
fep->full_duplex = 0; fep->full_duplex = 0;
phy_dev->mac_managed_pm = 1;
phy_attached_info(phy_dev); phy_attached_info(phy_dev);
return 0; return 0;
...@@ -3864,6 +3866,7 @@ static int __maybe_unused fec_resume(struct device *dev) ...@@ -3864,6 +3866,7 @@ static int __maybe_unused fec_resume(struct device *dev)
netif_device_attach(ndev); netif_device_attach(ndev);
netif_tx_unlock_bh(ndev); netif_tx_unlock_bh(ndev);
napi_enable(&fep->napi); napi_enable(&fep->napi);
phy_init_hw(ndev->phydev);
phy_start(ndev->phydev); phy_start(ndev->phydev);
} }
rtnl_unlock(); rtnl_unlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment