aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vz@mleia.com>2011-09-05 07:24:07 +0000
committerWolfgang Denk <wd@denx.de>2011-09-10 00:07:55 +0200
commite3a77218a256edbe201112a39beeed8adcabae3f (patch)
tree4ff351dfa6f5fcbc0a693cabfe6df24a5fca0034
parent46d7274cdcacc581bd02881e0aee4bb1a73e6f3a (diff)
downloadu-boot-e3a77218a256edbe201112a39beeed8adcabae3f.zip
u-boot-e3a77218a256edbe201112a39beeed8adcabae3f.tar.gz
u-boot-e3a77218a256edbe201112a39beeed8adcabae3f.tar.bz2
phylib: reset mii bus only if reset handler is registered
This change allows to cope with a mii bus device registered using miiphy_register(), which doesn't assign a default reset handler. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Acked-by: Detlev Zundel <dzu@denx.de>
-rw-r--r--drivers/net/phy/phy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index ce69c19..8da7688 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -692,7 +692,8 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr,
struct phy_device *phydev;
/* Reset the bus */
- bus->reset(bus);
+ if (bus->reset)
+ bus->reset(bus);
/* Wait 15ms to make sure the PHY has come out of hard reset */
udelay(15000);