public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/2] net: eth-uclass: Write MAC address to hardware after probe
@ 2019-04-16 16:24 Thierry Reding
  2019-04-16 16:24 ` [U-Boot] [PATCH v2 2/2] net: eth-uclass: Support device tree MAC addresses Thierry Reding
  2019-04-16 16:37 ` [U-Boot] [PATCH v2 1/2] net: eth-uclass: Write MAC address to hardware after probe Joe Hershberger
  0 siblings, 2 replies; 9+ messages in thread
From: Thierry Reding @ 2019-04-16 16:24 UTC (permalink / raw)
  To: u-boot

From: Thierry Reding <treding@nvidia.com>

In order for the device to use the proper MAC address, which can have
been configured in the environment prior to the device being registered,
ensure that the MAC address is written after the device has been probed.
For devices that are registered before the network stack is initialized,
this is already done during eth_initialize(). If the Ethernet device is
on a bus that is not initialized on early boot, such as PCI, the device
is not available at the time eth_initialize() is called, so we need the
MAC address programming to also happen after probe.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 net/eth-uclass.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 2ef20df19203..4225aabf1fa1 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -524,6 +524,8 @@ static int eth_post_probe(struct udevice *dev)
 #endif
 	}
 
+	eth_write_hwaddr(dev);
+
 	return 0;
 }
 
-- 
2.21.0

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

end of thread, other threads:[~2019-04-25 13:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-16 16:24 [U-Boot] [PATCH v2 1/2] net: eth-uclass: Write MAC address to hardware after probe Thierry Reding
2019-04-16 16:24 ` [U-Boot] [PATCH v2 2/2] net: eth-uclass: Support device tree MAC addresses Thierry Reding
2019-04-17 11:49   ` Grygorii Strashko
2019-04-17 15:03     ` Thierry Reding
2019-04-18  4:32       ` Simon Glass
2019-04-25 13:22         ` Thierry Reding
2019-04-18 16:30       ` Grygorii Strashko
2019-04-25 13:34         ` Thierry Reding
2019-04-16 16:37 ` [U-Boot] [PATCH v2 1/2] net: eth-uclass: Write MAC address to hardware after probe Joe Hershberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox