All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/2] net: Initialize as many ethernet devices as possible
@ 2018-04-27 12:52 Mario Six
  2018-04-27 12:52 ` [U-Boot] [PATCH v2 2/2] tsec: Fix reading phy registers from DT Mario Six
  2018-06-13 19:01 ` [U-Boot] net: Initialize as many ethernet devices as possible Joe Hershberger
  0 siblings, 2 replies; 4+ messages in thread
From: Mario Six @ 2018-04-27 12:52 UTC (permalink / raw)
  To: u-boot

On devices that have their first network interface provided by a FPGA,
the initialization of further interfaces will fail if the FPGA is not
yet programmed. This leads to problems during factory setup when the
data is supposed to be loaded over secondary netowork interfaces.

To avoid this, use the uclass_{first,next}_device_check functions to
initialize as many ethernet devices as possible.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
---

v1 -> v2:
No changes

---
 net/eth-uclass.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 240b596534..2877700ff4 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -396,7 +396,7 @@ int eth_initialize(void)
 	 * This is accomplished by attempting to probe each device and calling
 	 * their write_hwaddr() operation.
 	 */
-	uclass_first_device(UCLASS_ETH, &dev);
+	uclass_first_device_check(UCLASS_ETH, &dev);
 	if (!dev) {
 		printf("No ethernet found.\n");
 		bootstage_error(BOOTSTAGE_ID_NET_ETH_START);
@@ -425,7 +425,7 @@ int eth_initialize(void)
 
 			eth_write_hwaddr(dev);
 
-			uclass_next_device(&dev);
+			uclass_next_device_check(&dev);
 			num_devices++;
 		} while (dev);
 
-- 
2.16.1

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

end of thread, other threads:[~2018-06-13 19:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-27 12:52 [U-Boot] [PATCH v2 1/2] net: Initialize as many ethernet devices as possible Mario Six
2018-04-27 12:52 ` [U-Boot] [PATCH v2 2/2] tsec: Fix reading phy registers from DT Mario Six
2018-06-13 19:01   ` [U-Boot] " Joe Hershberger
2018-06-13 19:01 ` [U-Boot] net: Initialize as many ethernet devices as possible Joe Hershberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.