* [PATCH] cpsw: fix dt probe for one port ethernet
@ 2013-12-12 7:21 Alexander Aring
0 siblings, 0 replies; only message in thread
From: Alexander Aring @ 2013-12-12 7:21 UTC (permalink / raw)
To: barebox
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.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
I think we need this, too. Only compile tested.
drivers/net/cpsw.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index 5e68e1b..f82117c 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -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;
}
}
--
1.8.4.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-12 7:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-12 7:21 [PATCH] cpsw: fix dt probe for one port ethernet Alexander Aring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox