[U-Boot] [PATCH 2/3 v2] net/phy: update get_phy_device_by_mask to probe more 10G PHY
Shengzhou Liu
Shengzhou.Liu at freescale.com
Fri Mar 14 04:28:00 CET 2014
In function get_phy_device_by_mask(), when trying Clause 45,
we should extend the value of devad(used in create_phy_by_mask)
to zero to cover more PHYs (e.g. devad must be 0 for CS4315 PHY).
Signed-off-by: Shengzhou Liu <Shengzhou.Liu at freescale.com>
---
v2: no change
drivers/net/phy/phy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index da65329..6d4c05f 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -645,9 +645,9 @@ static struct phy_device *get_phy_device_by_mask(struct mii_dev *bus,
return phydev;
/* Try Standard (ie Clause 22) access */
/* Otherwise we have to try Clause 45 */
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < 6; i++) {
phydev = create_phy_by_mask(bus, phy_mask,
- i ? i : MDIO_DEVAD_NONE, interface);
+ i ? i - 1 : MDIO_DEVAD_NONE, interface);
if (IS_ERR(phydev))
return NULL;
if (phydev)
--
1.8.0
More information about the U-Boot
mailing list