Skip to contentSkip to conversation

cpsw: fix dt probe for one port ethernet

PATCH New Alexander Aring 1 participant 1 message Dec 12, 2013 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpsw: fix dt probe for one port ethernet

Taken from linux-omap mailinglist. See:

http://marc.info/?l=linux-omap&m=138682143215842&w=2

Original commit-msg:

When only one port of the two port is pinned out, then dt probe is failing because second port phy is not found. fixing this by checking the number of slaves and breaking the loop.

---
I think we need this, too. Only compile tested.

 drivers/net/cpsw.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/cpsw.c +2 -0
index 5e68e1b..f82117c 100644
@@ -1076,6 +1076,8 @@ static int cpsw_probe_dt(struct cpsw_priv *priv)
 			slave->phy_if = of_get_phy_mode(child);
 
 			i++;
+			if (i == priv->num_slaves)
+				break;
 		}
 	}
 
Signature · 7 lines
1.8.4.2


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox