diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2017-03-03 19:13:50 -0800 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2018-12-24 01:27:28 +0100 |
commit | 6940bfee7ef2cd69f7089272da2778fa5a9fe83b (patch) | |
tree | c09b38314414b6e00373c79fb04f7d4c5c658983 /drivers | |
parent | c570824f380daa18c5c06576feededf20dd662a6 (diff) |
net: fec: make sure runtime PM is suspended in system suspend
Use force suspend/resume to trigger runtime PM when entering system
suspend.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
(cherry picked from commit a2ccbd22f2b1da9b152039538fb3b5cb2cfc55c7)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 2e5efe6b1469..51fc44c8b314 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -3927,6 +3927,8 @@ static int __maybe_unused fec_suspend(struct device *dev) if (fep->clk_enet_out || fep->reg_phy) fep->link = 0; + pm_runtime_force_suspend(ndev->dev.parent); + return 0; } @@ -3937,6 +3939,8 @@ static int __maybe_unused fec_resume(struct device *dev) int ret = 0; int val; + pm_runtime_force_resume(ndev->dev.parent); + if (fep->reg_phy && !(fep->wol_flag & FEC_WOL_FLAG_ENABLE)) { ret = regulator_enable(fep->reg_phy); if (ret) |