diff options
Diffstat (limited to 'drivers/net/phy/smsc.c')
-rw-r--r-- | drivers/net/phy/smsc.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c index 2e21e9366f76..b62c4aaee40b 100644 --- a/drivers/net/phy/smsc.c +++ b/drivers/net/phy/smsc.c | |||
@@ -75,22 +75,13 @@ static int smsc_phy_reset(struct phy_device *phydev) | |||
75 | * in all capable mode before using it. | 75 | * in all capable mode before using it. |
76 | */ | 76 | */ |
77 | if ((rc & MII_LAN83C185_MODE_MASK) == MII_LAN83C185_MODE_POWERDOWN) { | 77 | if ((rc & MII_LAN83C185_MODE_MASK) == MII_LAN83C185_MODE_POWERDOWN) { |
78 | int timeout = 50000; | 78 | /* set "all capable" mode */ |
79 | |||
80 | /* set "all capable" mode and reset the phy */ | ||
81 | rc |= MII_LAN83C185_MODE_ALL; | 79 | rc |= MII_LAN83C185_MODE_ALL; |
82 | phy_write(phydev, MII_LAN83C185_SPECIAL_MODES, rc); | 80 | phy_write(phydev, MII_LAN83C185_SPECIAL_MODES, rc); |
83 | phy_write(phydev, MII_BMCR, BMCR_RESET); | ||
84 | |||
85 | /* wait end of reset (max 500 ms) */ | ||
86 | do { | ||
87 | udelay(10); | ||
88 | if (timeout-- == 0) | ||
89 | return -1; | ||
90 | rc = phy_read(phydev, MII_BMCR); | ||
91 | } while (rc & BMCR_RESET); | ||
92 | } | 81 | } |
93 | return 0; | 82 | |
83 | /* reset the phy */ | ||
84 | return genphy_soft_reset(phydev); | ||
94 | } | 85 | } |
95 | 86 | ||
96 | static int lan911x_config_init(struct phy_device *phydev) | 87 | static int lan911x_config_init(struct phy_device *phydev) |