summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJörg Krause <joerg.krause@embedded.rocks>2015-07-15 15:18:22 +0200
committerJoe Hershberger <joe.hershberger@ni.com>2015-08-11 13:48:25 -0500
commit59370f3fcd135089c402c93720a87c688abe600c (patch)
tree253f42ba7085f5af33b7295a8d1cc6ef42815644 /drivers
parent2c171a2a5fc0865501a2e5043e9728036dac6dc3 (diff)
downloadblackbird-obmc-uboot-59370f3fcd135089c402c93720a87c688abe600c.tar.gz
blackbird-obmc-uboot-59370f3fcd135089c402c93720a87c688abe600c.zip
net: phy: delay only if reset handler is registered
With commit e3a77218a256edbe201112a39beeed8adcabae3f the MII bus is only reset if a reset handler is registered. If there is no reset handler there is no need to wait for a device to come out of the reset. Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/phy.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 865abab9a1..65c731afb6 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -763,11 +763,13 @@ struct phy_device *phy_find_by_mask(struct mii_dev *bus, unsigned phy_mask,
phy_interface_t interface)
{
/* Reset the bus */
- if (bus->reset)
+ if (bus->reset) {
bus->reset(bus);
- /* Wait 15ms to make sure the PHY has come out of hard reset */
- udelay(15000);
+ /* Wait 15ms to make sure the PHY has come out of hard reset */
+ udelay(15000);
+ }
+
return get_phy_device_by_mask(bus, phy_mask, interface);
}
OpenPOWER on IntegriCloud