netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drivers: net: cpsw: fix dt probe for one port ethernet
@ 2013-12-12  4:09 Felipe Balbi
  2013-12-12  4:09 ` [PATCH 2/2] drivers: net: cpsw: fix for cpsw crash when build as modules Felipe Balbi
  2013-12-12  8:11 ` [PATCH 1/2] drivers: net: cpsw: fix dt probe for one port ethernet Mugunthan V N
  0 siblings, 2 replies; 5+ messages in thread
From: Felipe Balbi @ 2013-12-12  4:09 UTC (permalink / raw)
  To: davem
  Cc: mugunthanvnm, Sebastian Andrzej Siewior, netdev,
	Linux Kernel Mailing List, Linux OMAP Mailing List, Felipe Balbi

From: Mugunthan V N <mugunthanvnm@ti.com>

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: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---

both patches were taken from TI's 3.12 tree [1]
and have been tested on am335x, am437x and
dra7xx.

Mugunthan, I took the patches because I got bug reports
on v3.13-rc which these patches fix. Let me know if you
prefer to send another version of them for whatever
reason.

cheers

 drivers/net/ethernet/ti/cpsw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 7536a4c..a91f0c9 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1816,6 +1816,8 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
 		}
 
 		i++;
+		if (i == data->slaves)
+			break;
 	}
 
 	return 0;
-- 
1.8.4.GIT


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-12 18:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-12  4:09 [PATCH 1/2] drivers: net: cpsw: fix dt probe for one port ethernet Felipe Balbi
2013-12-12  4:09 ` [PATCH 2/2] drivers: net: cpsw: fix for cpsw crash when build as modules Felipe Balbi
2013-12-12 18:47   ` David Miller
2013-12-12  8:11 ` [PATCH 1/2] drivers: net: cpsw: fix dt probe for one port ethernet Mugunthan V N
2013-12-12 15:44   ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).