i.MX6: linux-imx imx_5.4.24_2.1.0 does not read FEC MAC address properly

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

i.MX6: linux-imx imx_5.4.24_2.1.0 does not read FEC MAC address properly

跳至解决方案
1,097 次查看
Garnold
Contributor I

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

 

0 项奖励
回复
1 解答
1,083 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

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

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,084 次查看
weidong_sun
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复