diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-07-21 22:29:27 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-21 23:04:31 (GMT) |
commit | 1c3c1e7996c1f99ab96b7d499d9d90072147909e (patch) | |
tree | 7ad3b0e50d90d53197fe7e88177d12f3b436388f /drivers/net/ethernet/broadcom/genet/bcmgenet.c | |
parent | 8fdb0e0fb972f9665dd21aa69825ba748ebbdf45 (diff) | |
download | linux-1c3c1e7996c1f99ab96b7d499d9d90072147909e.tar.xz |
net: bcmgenet: fix bcmgenet_wol_resume
bcmgenet_wol_resume() will create an unbalanced clock state for the
wol_clk clock pointer since everywhere else in the code, we always call
clk_prepare_enable() and clk_disable_unprepare(). This function also
calls init_umac() which is neither correct nor necessary since
bcmgenet_resume() and bcmgenet_open() already does that.
Finally calling bcmgenet_wol_resume() in bcmgenet_open() is not correct,
since the interface would not have been able to put us in Wake-on-LAN
mode if it was not UP before.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/genet/bcmgenet.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/genet/bcmgenet.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 319b943..1925ae1 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -1965,14 +1965,8 @@ static void bcmgenet_set_hw_addr(struct bcmgenet_priv *priv, static int bcmgenet_wol_resume(struct bcmgenet_priv *priv) { - int ret; - /* From WOL-enabled suspend, switch to regular clock */ - clk_disable(priv->clk_wol); - /* init umac registers to synchronize s/w with h/w */ - ret = init_umac(priv); - if (ret) - return ret; + clk_disable_unprepare(priv->clk_wol); phy_init_hw(priv->phydev); /* Speed settings must be restored */ |