Skip to content

Commit

Permalink
net: sh_eth: do not issue a wild PHY reset through BMCR
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Dec 10, 2013
1 parent 01b0114 commit 0c9eb5b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/ethernet/renesas/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,10 @@ static int sh_eth_phy_start(struct net_device *ndev)
return ret;

/* reset phy - this also wakes it from PDOWN */
phy_write(mdp->phydev, MII_BMCR, BMCR_RESET);
ret = phy_init_hw(mdp->phydev);
if (ret)
return ret;

phy_start(mdp->phydev);

return 0;
Expand Down

0 comments on commit 0c9eb5b

Please sign in to comment.