Skip to content

Commit

Permalink
net: ethernet: arc: Don't free Rockchip resources before disconnect f…
Browse files Browse the repository at this point in the history
…rom 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>
  • Loading branch information
Romain Perier authored and David S. Miller committed Sep 10, 2014
1 parent 0aac383 commit cf98192
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/arc/emac_rockchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit cf98192

Please sign in to comment.