From: Burak Aydos <byhexadecimal@gmail.com>
Date: Mon, 03 Feb 2026 12:00:00 +0300
Subject: [PATCH] net: ethernet: lantiq: xrx200: handle EPROBE_DEFER for MAC
 address

When the MAC address is provided by an nvmem layout driver (such as
u-boot-env), the nvmem cell may not be available yet when the ethernet
driver probes. In this case, of_get_ethdev_address() returns
-EPROBE_DEFER to indicate the driver should be retried later.

Currently the driver treats all errors equally and falls back to a
random MAC address. Fix this by propagating EPROBE_DEFER so the
driver probe is deferred until the nvmem cell becomes available.

Signed-off-by: Burak Aydos <byhexadecimal@gmail.com>
---
 drivers/net/ethernet/lantiq_xrx200.c | 2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/net/ethernet/lantiq_xrx200.c
+++ b/drivers/net/ethernet/lantiq_xrx200.c
@@ -597,6 +597,8 @@ static int xrx200_probe(struct platform_
 	}
 
 	err = of_get_ethdev_address(np, net_dev);
+	if (err == -EPROBE_DEFER)
+		return err;
 	if (err)
 		eth_hw_addr_random(net_dev);
 
