From: romain.perier@gmail.com (Romain Perier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1] net: ethernet: arc: Don't free Rockchip resources before disconnect from phy
Date: Wed, 10 Sep 2014 07:51:13 +0000 [thread overview]
Message-ID: <1410335473-23573-1-git-send-email-romain.perier@gmail.com> (raw)
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
next reply other threads:[~2014-09-10 7:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 7:51 Romain Perier [this message]
2014-09-10 20:03 ` [PATCH v1] net: ethernet: arc: Don't free Rockchip resources before disconnect from phy David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410335473-23573-1-git-send-email-romain.perier@gmail.com \
--to=romain.perier@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).