summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/amd
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-06-11 09:34:24 +0300
committerDavid S. Miller <davem@davemloft.net>2016-06-11 09:34:24 +0300
commit86c5fe4c932a8ef2d32f8b3d32cc9f0476fc54f3 (patch)
tree234803d45cfa608f97e925eb24984d97b8255071 /drivers/net/ethernet/amd
parenta2f27217e4e60e663b5b971b0ccb287a9548b04e (diff)
downloadlinux-86c5fe4c932a8ef2d32f8b3d32cc9f0476fc54f3.tar.xz
Revert "net: au1000_eth: fix PHY detection"
This reverts commit a2f27217e4e60e663b5b971b0ccb287a9548b04e. I applied the wrong version of this. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd')
-rw-r--r--drivers/net/ethernet/amd/au1000_eth.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c
index d8c77e8e25ed..e0fb0f1122db 100644
--- a/drivers/net/ethernet/amd/au1000_eth.c
+++ b/drivers/net/ethernet/amd/au1000_eth.c
@@ -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 */