Commit cf98192d authored by Romain Perier's avatar Romain Perier Committed by David S. Miller

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: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0aac3833
...@@ -202,12 +202,13 @@ static int emac_rockchip_remove(struct platform_device *pdev) ...@@ -202,12 +202,13 @@ static int emac_rockchip_remove(struct platform_device *pdev)
struct rockchip_priv_data *priv = netdev_priv(ndev); struct rockchip_priv_data *priv = netdev_priv(ndev);
int err; int err;
err = arc_emac_remove(ndev);
clk_disable_unprepare(priv->refclk); clk_disable_unprepare(priv->refclk);
if (priv->regulator) if (priv->regulator)
regulator_disable(priv->regulator); regulator_disable(priv->regulator);
err = arc_emac_remove(ndev);
free_netdev(ndev); free_netdev(ndev);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment