The function of_get_mac_address is not taking care of evaluation the nvmem
address before trying to read out the mac-address properties. The driver
must check whether the return code is -EPROBE_DEFER and stop the probing
process in that case. If the nvmem-cell related driver code finished, the
probe can be redone ad the correct mac-address will appear for the device.
Signed-off-by: Harshal Gohel <[email protected]>
Signed-off-by: Sharadanand Karanjkar <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/19362
Signed-off-by: Hauke Mehrtens <[email protected]>
* 1) from device tree data
* 2) from internal registers set by bootloader
*/
- of_get_mac_address(pdev->dev.of_node, mac_addr);
+ err = of_get_mac_address(pdev->dev.of_node, mac_addr);
+ if (err == -EPROBE_DEFER)
+ return err;
+
if (is_valid_ether_addr(mac_addr)) {
rtl838x_set_mac_hw(dev, mac_addr);
} else {