Skip to content

Commit f22bd29

Browse files
Radhey Shyam Pandeydavem330
authored andcommitted
net: macb: Fix ZynqMP SGMII non-wakeup source resume failure
When GEM is in SGMII mode and disabled as a wakeup source, the power management controller can power down the entire full power domain(FPD) if none of the FPD devices are in use. Incase of FPD off, there are below ethernet link up issues on non-wakeup suspend/resume. To fix it add phy_exit() in suspend and phy_init() in the resume path which reinitializes PS GTR SGMII lanes. $ echo +20 > /sys/class/rtc/rtc0/wakealarm $ echo mem > /sys/power/state After resume: $ ifconfig eth0 up xilinx-psgtr fd400000.phy: lane 0 (type 10, protocol 5): PLL lock timeout phy phy-fd400000.phy.0: phy poweron failed --> -110 xilinx-psgtr fd400000.phy: lane 0 (type 10, protocol 5): PLL lock timeout SIOCSIFFLAGS: Connection timed out phy phy-fd400000.phy.0: phy poweron failed --> -110 Fixes: 8b73fa3 ("net: macb: Added ZynqMP-specific initialization") Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 195624d commit f22bd29

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5109,6 +5109,7 @@ static int __maybe_unused macb_suspend(struct device *dev)
51095109
if (!(bp->wol & MACB_WOL_ENABLED)) {
51105110
rtnl_lock();
51115111
phylink_stop(bp->phylink);
5112+
phy_exit(bp->sgmii_phy);
51125113
rtnl_unlock();
51135114
spin_lock_irqsave(&bp->lock, flags);
51145115
macb_reset_hw(bp);
@@ -5198,6 +5199,9 @@ static int __maybe_unused macb_resume(struct device *dev)
51985199
macb_set_rx_mode(netdev);
51995200
macb_restore_features(bp);
52005201
rtnl_lock();
5202+
if (!device_may_wakeup(&bp->dev->dev))
5203+
phy_init(bp->sgmii_phy);
5204+
52015205
phylink_start(bp->phylink);
52025206
rtnl_unlock();
52035207

0 commit comments

Comments
 (0)