diff options
author | David S. Miller <davem@davemloft.net> | 2014-11-07 04:01:18 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-07 04:01:18 +0100 |
commit | 4e84b496fd2a226883920e0e0de4ed3f94898adf (patch) | |
tree | 662e314870fabf5d6e3bf25b955bd537eb72de54 /drivers/net/ethernet/freescale | |
parent | vxlan: Fix to enable UDP checksums on interface (diff) | |
parent | netxen: Fix link event handling. (diff) | |
download | linux-4e84b496fd2a226883920e0e0de4ed3f94898adf.tar.xz linux-4e84b496fd2a226883920e0e0de4ed3f94898adf.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 50a851db2852..c27128de8dde 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -3343,12 +3343,11 @@ static int __maybe_unused fec_suspend(struct device *dev) netif_device_detach(ndev); netif_tx_unlock_bh(ndev); fec_stop(ndev); + fec_enet_clk_enable(ndev, false); + pinctrl_pm_select_sleep_state(&fep->pdev->dev); } rtnl_unlock(); - fec_enet_clk_enable(ndev, false); - pinctrl_pm_select_sleep_state(&fep->pdev->dev); - if (fep->reg_phy) regulator_disable(fep->reg_phy); @@ -3367,13 +3366,14 @@ static int __maybe_unused fec_resume(struct device *dev) return ret; } - pinctrl_pm_select_default_state(&fep->pdev->dev); - ret = fec_enet_clk_enable(ndev, true); - if (ret) - goto failed_clk; - rtnl_lock(); if (netif_running(ndev)) { + pinctrl_pm_select_default_state(&fep->pdev->dev); + ret = fec_enet_clk_enable(ndev, true); + if (ret) { + rtnl_unlock(); + goto failed_clk; + } fec_restart(ndev); netif_tx_lock_bh(ndev); netif_device_attach(ndev); |