]> git.baikalelectronics.ru Git - kernel.git/commit
net: macb: Fix ZynqMP SGMII non-wakeup source resume failure
authorRadhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Wed, 21 Sep 2022 13:36:10 +0000 (19:06 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Sep 2022 11:32:49 +0000 (12:32 +0100)
commitc0b9d414a6a06dc7562fd3a448c613484c02da36
tree10337fb3d006b423bc5213daba84f5bcac0b0f7b
parente39ba83720e63b42f13639c7815d055c613d21c3
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: 9fd102ef8851 ("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>
drivers/net/ethernet/cadence/macb_main.c