Revert "net: au1000_eth: fix PHY detection"
authorDavid S. Miller <davem@davemloft.net>
Sat, 11 Jun 2016 06:34:24 +0000 (23:34 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Jun 2016 06:34:24 +0000 (23:34 -0700)
This reverts commit a2f27217e4e60e663b5b971b0ccb287a9548b04e.

I applied the wrong version of this.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/au1000_eth.c

index d8c77e8e25edb113c614766f493b022c640d5ff4..e0fb0f1122db42553c0ed4a907d89a1e03e1f209 100644 (file)
@@ -508,12 +508,13 @@ static int au1000_mii_probe(struct net_device *dev)
        /* find the first (lowest address) PHY
         * on the current MAC's MII bus
         */
-       for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) {
-               phydev = mdiobus_get_phy(aup->mii_bus, phy_addr);
-               if (phydev && !aup->phy_search_highest_addr)
-                       /* break out with first one found */
-                       break;
-       }
+       for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++)
+               if (mdiobus_get_phy(aup->mii_bus, aup->phy_addr)) {
+                       phydev = mdiobus_get_phy(aup->mii_bus, aup->phy_addr);
+                       if (!aup->phy_search_highest_addr)
+                               /* break out with first one found */
+                               break;
+               }
 
        if (aup->phy1_search_mac0) {
                /* try harder to find a PHY */