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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
1,098 Views
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 Kudos
Reply
1 Solution
1,084 Views
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

View solution in original post

0 Kudos
Reply
1 Reply
1,085 Views
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 Kudos
Reply