diff options
author | Fugang Duan <fugang.duan@nxp.com> | 2017-05-04 18:20:23 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 6e28dfc6bcae6193e0716eca9e034f015ee84701 (patch) | |
tree | f20dd7812502337a9b1151492c810e44e771e103 /drivers/net/ethernet/freescale/fec_main.c | |
parent | fbc7ce47d0e2038bf927afce9ea1527ceb1cf422 (diff) |
MLK-14805 Revert "MLK-14470 net: fec: let shared mii bus always be active"
This reverts commit a87bb06a0bc7 that breaks busfreq test case.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/fec_main.c')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index ca2874ba38f2..51a0401f0dbf 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -2918,12 +2918,9 @@ fec_enet_open(struct net_device *ndev) return ret; pinctrl_pm_select_default_state(&fep->pdev->dev); - if (!(fep->mii_bus_share && fep->mii_bus_active)) { - fep->mii_bus_active = true;; - ret = fec_enet_clk_enable(ndev, true); - if (ret) - goto clk_enable; - } + ret = fec_enet_clk_enable(ndev, true); + if (ret) + goto clk_enable; /* I should reset the ring buffers here, but I don't yet know * a simple way to do that. @@ -2971,11 +2968,10 @@ err_enet_alloc: if (!fep->mii_bus_share) fec_enet_clk_enable(ndev, false); clk_enable: - if (!fep->mii_bus_share) { - pm_runtime_mark_last_busy(&fep->pdev->dev); - pm_runtime_put_autosuspend(&fep->pdev->dev); + pm_runtime_mark_last_busy(&fep->pdev->dev); + pm_runtime_put_autosuspend(&fep->pdev->dev); + if (!fep->mii_bus_share) pinctrl_pm_select_sleep_state(&fep->pdev->dev); - } return ret; } @@ -3000,10 +2996,7 @@ fec_enet_close(struct net_device *ndev) fec_enet_update_ethtool_stats(ndev); - if (!fep->mii_bus_share) { - fec_enet_clk_enable(ndev, false); - fep->mii_bus_active = false; - } + fec_enet_clk_enable(ndev, false); pm_qos_remove_request(&fep->pm_qos_req); pinctrl_pm_select_sleep_state(&fep->pdev->dev); pm_runtime_mark_last_busy(&fep->pdev->dev); |