Merge branch 'master' of git://www.denx.de/git/u-boot-imx
[oweals/u-boot.git] / drivers / net / phy / phy.c
index 865abab9a1c44fb2423998b1ec1ba64974a0be26..a6023f1033ecc879eff43b7719b1ca66cb6f2157 100644 (file)
@@ -571,7 +571,7 @@ static struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
        memset(dev, 0, sizeof(*dev));
 
        dev->duplex = -1;
-       dev->link = 1;
+       dev->link = 0;
        dev->interface = interface;
 
        dev->autoneg = AUTONEG_ENABLE;
@@ -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);
 }