diff mbox

[U-Boot,2/3] net/phy: update get_phy_device_by_mask to probe more 10G PHY

Message ID 1394005137-24255-2-git-send-email-Shengzhou.Liu@freescale.com
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Shengzhou Liu March 5, 2014, 7:38 a.m. UTC
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@freescale.com>
---
 drivers/net/phy/phy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index c8e7f64..7e9f2b2 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -647,9 +647,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)