Re: [U-Boot] [PATCH 2/4] net: Initialize as many ethernet devices as possible

2018-03-28 Thread Joe Hershberger
On Wed, Mar 28, 2018 at 7:38 AM, Mario Six  wrote:
> 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 

Seems reasonable.

Acked-by: Joe Hershberger 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 2/4] net: Initialize as many ethernet devices as possible

2018-03-28 Thread Mario Six
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 
---
 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, );
+   uclass_first_device_check(UCLASS_ETH, );
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();
+   uclass_next_device_check();
num_devices++;
} while (dev);

--
2.16.1

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot