ag7xxx: add initial support for s17
[oweals/u-boot.git] / drivers / net / macb.c
index 182331f61d15a9ae38755a5ecc803c0e182249ad..72614164e9c7c36c283ece131a334468d78cc9f4 100644 (file)
@@ -550,8 +550,14 @@ static int macb_phy_init(struct macb_device *macb, const char *name)
 
                for (i = 0; i < MACB_AUTONEG_TIMEOUT / 100; i++) {
                        status = macb_mdio_read(macb, MII_BMSR);
-                       if (status & BMSR_LSTATUS)
+                       if (status & BMSR_LSTATUS) {
+                               /*
+                                * Delay a bit after the link is established,
+                                * so that the next xfer does not fail
+                                */
+                               mdelay(10);
                                break;
+                       }
                        udelay(100);
                }
        }