Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: phy: fix may not suspend when phy has WoL
When system suspend, and mdio_bus_phy goes to suspend, if the phy enabled wol, phy_suspend will returned -EBUSY, and break system suspend. 93f41e6(net: phy: fix WoL handling when suspending the PHY) Fix the case when netdev->wol_enabled=1, but some case, netdev->wol_enabled=0 and phydev set wol_enabled enabled, so check phydev->wol_enabled. I dont know why 481b5d9(net: phy: provide phy_resume/phy_suspend helpers) think that it should return -EBUSY when WoL. Log: YT8531S Gigabit Ethernet phytmac_mii_bus-PHYT0046:00:07: PM: dpm_run_callback(): mdio_bus_phy_suspend+0x0/0x10c returns -16 YT8531S Gigabit Ethernet phytmac_mii_bus-PHYT0046:00:07: PM: failed to suspend: error -16 PM: Some devices failed to suspend, or early wake event detected YT8531S Gigabit Ethernet phytmac_mii_bus-PHYT0046:00:07: PM: dpm_run_callback(): mdio_bus_phy_suspend+0x0/0x10c returns -16 YT8531S Gigabit Ethernet phytmac_mii_bus-PHYT0046:00:07: PM: failed to suspend: error -16 PM: Some devices failed to suspend, or early wake event detected YT8531S Gigabit Ethernet phytmac_mii_bus-PHYT0046:00:07: PM: dpm_run_callback(): mdio_bus_phy_suspend+0x0/0x10c returns -16 YT8531S Gigabit Ethernet phytmac_mii_bus-PHYT0046:00:07: PM: failed to freeze: error -16 Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
- Loading branch information