summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMario Six <mario.six@gdsys.cc>2018-04-27 14:52:56 +0200
committerJoe Hershberger <joe.hershberger@ni.com>2018-06-13 13:54:15 -0500
commit3ce4304205eac2bc19b9fd67651d65f7d19d3cf2 (patch)
treee88fcc19f277fd570c7c36a5010f54aaee6895da /net
parent2d8f25ed7b3626930b9fc950b20a1ec0be7abbe9 (diff)
net: Initialize as many ethernet devices as possible
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>
Diffstat (limited to 'net')
-rw-r--r--net/eth-uclass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index d20a1cf1607..e4b49229e38 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -395,7 +395,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);
@@ -424,7 +424,7 @@ int eth_initialize(void)
eth_write_hwaddr(dev);
- uclass_next_device(&dev);
+ uclass_next_device_check(&dev);
num_devices++;
} while (dev);