aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2013-12-06 16:01:38 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-09 20:38:59 -0500
commit0c9eb5b931c3da3a79faa889b903dc7bd318203c (patch)
treebc291d4587494cd5419e672eaeb3e9682239c608 /drivers
parent01b0114e068480226bc22fea18c3bccbd815ce8b (diff)
net: sh_eth: do not issue a wild PHY reset through BMCR
The sh_eth driver issues an uncontrolled PHY reset through the MII register BMCR but fails to wait for the reset to complete, and will also implicitely wipe out all possible PHY fixups applied. Use phy_init_hw() which remedies both problems. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/renesas/sh_eth.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index d256ce19d4de..6761dde7007a 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -1704,7 +1704,10 @@ static int sh_eth_phy_start(struct net_device *ndev)
1704 return ret; 1704 return ret;
1705 1705
1706 /* reset phy - this also wakes it from PDOWN */ 1706 /* reset phy - this also wakes it from PDOWN */
1707 phy_write(mdp->phydev, MII_BMCR, BMCR_RESET); 1707 ret = phy_init_hw(mdp->phydev);
1708 if (ret)
1709 return ret;
1710
1708 phy_start(mdp->phydev); 1711 phy_start(mdp->phydev);
1709 1712
1710 return 0; 1713 return 0;