summaryrefslogtreecommitdiff
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-10-29 20:30:33 (GMT)
committerTom Rini <trini@konsulko.com>2015-10-29 20:30:33 (GMT)
commit0eb4cf9c14315e1976a116de75da6f420ac0e8dd (patch)
tree3933d354a6be71cbe66d583fec3f5b2479e596ee /drivers/net/phy/phy.c
parent446d37c1acc76680770400fd90e6c502e49d72df (diff)
parentac1d31380618f3f68bf7f05b73b6ab0cdeab0e9f (diff)
downloadu-boot-fsl-qoriq-0eb4cf9c14315e1976a116de75da6f420ac0e8dd.tar.xz
Merge branch 'master' of git://git.denx.de/u-boot-net
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index a6023f1..d7364ff 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -671,8 +671,16 @@ static struct phy_device *get_phy_device_by_mask(struct mii_dev *bus,
if (phydev)
return phydev;
}
- printf("Phy %d not found\n", ffs(phy_mask) - 1);
- return phy_device_create(bus, ffs(phy_mask) - 1, 0xffffffff, interface);
+
+ debug("\n%s PHY: ", bus->name);
+ while (phy_mask) {
+ int addr = ffs(phy_mask) - 1;
+ debug("%d ", addr);
+ phy_mask &= ~(1 << addr);
+ }
+ debug("not found\n");
+
+ return NULL;
}
/**
@@ -781,7 +789,7 @@ void phy_connect_dev(struct phy_device *phydev, struct eth_device *dev)
{
/* Soft Reset the PHY */
phy_reset(phydev);
- if (phydev->dev) {
+ if (phydev->dev && phydev->dev != dev) {
printf("%s:%d is connected to %s. Reconnecting to %s\n",
phydev->bus->name, phydev->addr,
phydev->dev->name, dev->name);