We are building our own firmware using meta-freescale Yocto layer. As we have moved to dunfell, we have stumbled upon a bug that the network's card MAC address have changed. Upon closer investigation we have found that it is a small bug in the kernel, as it is incorrectly checking the result of of_get_mac_address() function. Attached is a patch that fixes the issue for us.
I did not find a better place to submit this bug than here; if it is not a correct place to to send patches then please provide me with a proper one.
---------------
From cfeadf5752bb4c14967781c935537f1e91928532 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Krystian=20Garli=C5=84ski?= <krystian.garlinski@comarch.pl>
Date: Tue, 20 Oct 2020 15:35:07 +0200
Subject: [PATCH] imx: fix fec MAC address reading
---
arch/arm/mach-imx/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/common.c b/arch/arm/mach-imx/common.c
index 2f644c6b2c28..1792c80721d9 100644
--- a/arch/arm/mach-imx/common.c
+++ b/arch/arm/mach-imx/common.c
@@ -59,7 +59,7 @@ void __init imx6_enet_mac_init(const char *enet_compat, const char *ocotp_compat
from = enet_np;
- if (of_get_mac_address(enet_np))
+ if (!IS_ERR(of_get_mac_address(enet_np)))
goto put_enet_node;
id = of_alias_get_id(enet_np, "ethernet");
--
2.25.1
Solved! Go to Solution.
Hello Garnold,
Thanks for your sharing patch with us!
I have forwarded the patch to i.MX Expert team.
Have a nice day!
B.R,
weidong
Hello Garnold,
Thanks for your sharing patch with us!
I have forwarded the patch to i.MX Expert team.
Have a nice day!
B.R,
weidong