Skip to content
Snippets Groups Projects
Commit e3a77218 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Wolfgang Denk
Browse files

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: default avatarVladimir Zapolskiy <vz@mleia.com>
Acked-by: default avatarDetlev Zundel <dzu@denx.de>
parent 46d7274c
No related branches found
No related tags found
No related merge requests found
...@@ -692,7 +692,8 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr, ...@@ -692,7 +692,8 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr,
struct phy_device *phydev; struct phy_device *phydev;
/* Reset the bus */ /* 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 */ /* Wait 15ms to make sure the PHY has come out of hard reset */
udelay(15000); udelay(15000);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment