提交 e3a77218 编写于 作者: V Vladimir Zapolskiy 提交者: Wolfgang Denk

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: NVladimir Zapolskiy <vz@mleia.com>
Acked-by: NDetlev Zundel <dzu@denx.de>
上级 46d7274c
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册