net: au1000_eth: fix PHY detection
Commit 7f854420fb
("phy: Add API for {un}registering an mdio device to a bus.")
broke PHY detection on this driver with a copy-paste bug:
The code is looking 32 times for a PHY at address 0.
Fixes ethernet on AMD DB1100/DB1500/DB1550 boards which have
their (autodetected) PHYs at address 31.
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
86c5fe4c93
commit
92ca824153
|
@ -509,8 +509,8 @@ static int au1000_mii_probe(struct net_device *dev)
|
|||
* on the current MAC's MII bus
|
||||
*/
|
||||
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 (mdiobus_get_phy(aup->mii_bus, phy_addr)) {
|
||||
phydev = mdiobus_get_phy(aup->mii_bus, phy_addr);
|
||||
if (!aup->phy_search_highest_addr)
|
||||
/* break out with first one found */
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue