summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2015-10-07 21:19:30 -0700
committerJoe Hershberger <joe.hershberger@ni.com>2015-10-29 14:05:49 -0500
commit3e1949d77463b062a4f8d380128abb7854f4907b (patch)
treee0689d3916501a5caf169920a6f0ea5484da7015 /drivers/net
parent0132b9ab6e6593d1fd259cdd26261f184c436fdd (diff)
downloadtalos-obmc-uboot-3e1949d77463b062a4f8d380128abb7854f4907b.tar.gz
talos-obmc-uboot-3e1949d77463b062a4f8d380128abb7854f4907b.zip
net: phy: Change to print all phys that are not found
In get_phy_device_by_mask(), when no phy is found, currently we only print a message to show the first phy address that is not found. But this is not always the case as multiple phys can be specified by phy_mask. Change to print all phys that are not found, and to reduce the console boot log, change to use 'debug' instead of 'printf'. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/phy/phy.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 4063894bf4..d0b3e8523f 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -671,7 +671,14 @@ 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);
+
+ 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;
}
OpenPOWER on IntegriCloud