]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
net: phy: Change to print all phys that are not found
authorBin Meng <bmeng.cn@gmail.com>
Thu, 8 Oct 2015 04:19:30 +0000 (21:19 -0700)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 29 Oct 2015 19:05:49 +0000 (14:05 -0500)
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>
drivers/net/phy/phy.c

index 4063894bf4673404a672ee7b5f3572d5ddec2b72..d0b3e8523fcdc94bbd20f512e134aab246228bc6 100644 (file)
@@ -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;
 }