summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorFugang Duan <fugang.duan@nxp.com>2017-05-04 18:20:23 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit6e28dfc6bcae6193e0716eca9e034f015ee84701 (patch)
treef20dd7812502337a9b1151492c810e44e771e103 /drivers/net
parentfbc7ce47d0e2038bf927afce9ea1527ceb1cf422 (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')
-rw-r--r--drivers/net/ethernet/freescale/fec.h1
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c21
2 files changed, 7 insertions, 15 deletions
diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h
index 7ffcabc478a6..158d80faf68c 100644
--- a/drivers/net/ethernet/freescale/fec.h
+++ b/drivers/net/ethernet/freescale/fec.h
@@ -545,7 +545,6 @@ struct fec_enet_private {
int mii_timeout;
int mii_bus_share;
bool miibus_up_failed;
- bool mii_bus_active;
uint phy_speed;
phy_interface_t phy_interface;
struct device_node *phy_node;
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);