summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/arc
diff options
context:
space:
mode:
authorRomain Perier <romain.perier@gmail.com>2014-09-10 07:51:13 +0000
committerDavid S. Miller <davem@davemloft.net>2014-09-10 13:03:00 -0700
commitcf98192d2e2b923241b8e6eee05a5b31f4bc16f2 (patch)
tree937a8f3500c81a9c9e4bd73c7d3166ec0e2bb057 /drivers/net/ethernet/arc
parent0aac383353693edcd8fc5a82a692bb7e5f60d2fd (diff)
net: ethernet: arc: Don't free Rockchip resources before disconnect from phy
Free resources before being disconnected from phy and calling core driver is wrong and should not happen. It avoids a delay of 4-5s caused by the timeout of phy_disconnect(). Signed-off-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/arc')
-rw-r--r--drivers/net/ethernet/arc/emac_rockchip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/arc/emac_rockchip.c b/drivers/net/ethernet/arc/emac_rockchip.c
index 51d0585e2575..c31c7407b753 100644
--- a/drivers/net/ethernet/arc/emac_rockchip.c
+++ b/drivers/net/ethernet/arc/emac_rockchip.c
@@ -202,12 +202,13 @@ static int emac_rockchip_remove(struct platform_device *pdev)
struct rockchip_priv_data *priv = netdev_priv(ndev);
int err;
+ err = arc_emac_remove(ndev);
+
clk_disable_unprepare(priv->refclk);
if (priv->regulator)
regulator_disable(priv->regulator);
- err = arc_emac_remove(ndev);
free_netdev(ndev);
return err;
}