+ /* Read PHY control register */
+ miiphy_read(dev->name, info->phy_addr, MII_BMCR, &status);
+
+ /* If phy set to autonegotiate, wait for autonegotiation done,
+ * if phy is not autonegotiating, just wait for link up.
+ */
+ if ((status & BMCR_ANENABLE) == BMCR_ANENABLE) {
+ linkgood = (BMSR_ANEGCOMPLETE | BMSR_LSTATUS);
+ } else {
+ linkgood = BMSR_LSTATUS;
+ }
+ /* Read PHY status register */
+ miiphy_read(dev->name, info->phy_addr, MII_BMSR, &status);
+ if ((status & linkgood) == linkgood)