linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] net: ethernet: arc: Don't free Rockchip resources before disconnect from phy
@ 2014-09-10  7:51 Romain Perier
  2014-09-10 20:03 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Romain Perier @ 2014-09-10  7:51 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 drivers/net/ethernet/arc/emac_rockchip.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/arc/emac_rockchip.c b/drivers/net/ethernet/arc/emac_rockchip.c
index 51d0585..c31c740 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;
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-10 20:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-10  7:51 [PATCH v1] net: ethernet: arc: Don't free Rockchip resources before disconnect from phy Romain Perier
2014-09-10 20:03 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).