aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/toshiba/tc35815.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-12-09 20:39:05 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-09 20:39:05 -0500
commit65be6291c856bee0308c535287f813418402d8b3 (patch)
treebc291d4587494cd5419e672eaeb3e9682239c608 /drivers/net/ethernet/toshiba/tc35815.c
parenttun: remove useless codes in tun_chr_aio_read() and tun_recvmsg() (diff)
parentnet: sh_eth: do not issue a wild PHY reset through BMCR (diff)
downloadlinux-dev-65be6291c856bee0308c535287f813418402d8b3.tar.xz
linux-dev-65be6291c856bee0308c535287f813418402d8b3.zip
Merge branch 'phy_reset'
Florian Fainelli says: ==================== net: phy: consolidate PHY reset This patchset consolidates the PHY reset through the MII BMCR register by using a central place were this is done. This patchset resumes the work Kyle Moffett started here: https://lkml.org/lkml/2011/10/20/301 Note that at this point, drivers doing funky things after issuing a PHY reset using phy_init_hw() will still suffer from PHY state machine problems, this will be taken care of later on. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/toshiba/tc35815.c')
-rw-r--r--drivers/net/ethernet/toshiba/tc35815.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/net/ethernet/toshiba/tc35815.c b/drivers/net/ethernet/toshiba/tc35815.c
index 1322546d92ac..f6b3212ec339 100644
--- a/drivers/net/ethernet/toshiba/tc35815.c
+++ b/drivers/net/ethernet/toshiba/tc35815.c
@@ -1170,19 +1170,12 @@ static int tc35815_tx_full(struct net_device *dev)
static void tc35815_restart(struct net_device *dev)
{
struct tc35815_local *lp = netdev_priv(dev);
+ int ret;
if (lp->phy_dev) {
- int timeout;
-
- phy_write(lp->phy_dev, MII_BMCR, BMCR_RESET);
- timeout = 100;
- while (--timeout) {
- if (!(phy_read(lp->phy_dev, MII_BMCR) & BMCR_RESET))
- break;
- udelay(1);
- }
- if (!timeout)
- printk(KERN_ERR "%s: BMCR reset failed.\n", dev->name);
+ ret = phy_init_hw(lp->phy_dev);
+ if (ret)
+ printk(KERN_ERR "%s: PHY init failed.\n", dev->name);
}
spin_lock_bh(&lp->rx_lock);