net: eth-uclass: Remove warning about ROM MAC address
PATCH 1/1 net: eth-uclass: Remove warning about ROM MAC address
Using a MAC address from ROM storage is the normal case for most ethernet hardware. Why should we warn about this?
---
Cc: Joe Hershberger <[email protected]>
Cc: u-boot at lists.denx.de
--- net/eth-uclass.c | 2 -- 1 file changed, 2 deletions(-)
net/eth-uclass.c +0 -2
@@ -538,8 +538,6 @@ static int eth_post_probe(struct udevice *dev)memcpy (pdata->enetaddr, env_enetaddr,ARP_HLEN ); }else if (is_valid_ethaddr (pdata->enetaddr)) {eth_env_set_enetaddr_by_index ("eth" , dev->seq, pdata->enetaddr); -printf ("\nWarning: %s using MAC address from ROM\n" , - dev->name); }else if (is_zero_ethaddr (pdata->enetaddr) || !is_valid_ethaddr (pdata->enetaddr)) {#ifdef CONFIG_NET_RANDOM_ETHADDR
--
2.17.1
PATCH 1/1 net: eth-uclass: Remove warning about ROM MAC address
Hi Soeren,
Quoted 3 lines · Soeren Moch
Using a MAC address from ROM storage is the normal case for most ethernet hardware. Why should we warn about this?
Most hardware that U-Boot runs on is an SoC and the boards rarely have a ROM associated with the Ethernet MAC. Usually the storage for the ethaddr is the U-Boot environment itself. That's the reason it warns.
Cheers,
-Joe
Quoted 28 lines
Signed-off-by Soeren Moch <[email protected]>---
Cc: Joe Hershberger <[email protected]>
Cc: u-boot at lists.denx.de--- net/eth-uclass.c | 2 -- 1 file changed, 2 deletions(-)net/eth-uclass.c +0
-3@@ -538,8 +538,6 @@ static int eth_post_probe(struct udevice *dev)memcpy (pdata->enetaddr, env_enetaddr,ARP_HLEN ); }else if (is_valid_ethaddr (pdata->enetaddr)) {eth_env_set_enetaddr_by_index ("eth" , dev->seq, pdata->enetaddr); -printf ("\nWarning: %s using MAC address from ROM\n" , - dev->name); }else if (is_zero_ethaddr (pdata->enetaddr) || !is_valid_ethaddr (pdata->enetaddr)) {#ifdef CONFIG_NET_RANDOM_ETHADDR --2.17.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH 1/1 net: eth-uclass: Remove warning about ROM MAC address
Hi Joe,
Quoted 8 lines · Joe Hershberger
Hi Soeren,
Quoted 2 lines · Soeren Moch
Using a MAC address from ROM storage is the normal case for most ethernet hardware. Why should we warn about this?
Most hardware that U-Boot runs on is an SoC and the boards rarely have a ROM associated with the Ethernet MAC. Usually the storage for the ethaddr is the U-Boot environment itself. That's the reason it warns.
Hm, I just converted the tbs2910 board to DM_ETH and now see this misleading warning. This board is based on a i.MX6Q SoC (ARMv7), the ethernet MAC is stored in fuses on this SoC.
There is absolutely nothing wrong in using the ROM MAC address. For systems without ROM storage we use the environment to set the MAC, also fine. Also OK if both addresses are set identically.
We only should warn the user if addresses are set inconsistently or not set at all.
Regards,
Soeren
Quoted 32 lines
Cheers,
-JoeQuoted 28 lines
Signed-off-by Soeren Moch <[email protected]>---
Cc: Joe Hershberger <[email protected]>
Cc: u-boot at lists.denx.de--- net/eth-uclass.c | 2 -- 1 file changed, 2 deletions(-)net/eth-uclass.c +0
-3@@ -538,8 +538,6 @@ static int eth_post_probe(struct udevice *dev)memcpy (pdata->enetaddr, env_enetaddr,ARP_HLEN ); }else if (is_valid_ethaddr (pdata->enetaddr)) {eth_env_set_enetaddr_by_index ("eth" , dev->seq, pdata->enetaddr); -printf ("\nWarning: %s using MAC address from ROM\n" , - dev->name); }else if (is_zero_ethaddr (pdata->enetaddr) || !is_valid_ethaddr (pdata->enetaddr)) {#ifdef CONFIG_NET_RANDOM_ETHADDR --2.17.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH 1/1 net: eth-uclass: Remove warning about ROM MAC address
In reply to Joe HershbergerHi Joe,
Quoted 11 lines · Joe Hershberger
Hi Soeren,
Quoted 3 lines · Soeren Moch
Using a MAC address from ROM storage is the normal case for most ethernet hardware. Why should we warn about this?
Most hardware that U-Boot runs on is an SoC and the boards rarely have a ROM associated with the Ethernet MAC. Usually the storage for the ethaddr is the U-Boot environment itself. That's the reason it warns.
On i.MX SoCs the MAC usually is stored in fuses via On-Chip OTP Controller (OCOTP).
Should we at least change the message to debug() level instead?
As Soeren says there is nothing wrong with the fact that the MAC addresses are retrieved from fuses and there is nothing the user can do about this warning message.
IMHO it is causing pure noise.
Thanks
PATCH 1/1 net: eth-uclass: Remove warning about ROM MAC address
In reply to Soeren MochHi Soeren,
Quoted 17 lines · Soeren Moch
Using a MAC address from ROM storage is the normal case for most ethernet hardware. Why should we warn about this?
Signed-off-by Soeren Moch <[email protected]>---
Cc: Joe Hershberger <[email protected]>
Cc: u-boot at lists.denx.de--- net/eth-uclass.c | 2 -- 1 file changed, 2 deletions(-)net/eth-uclass.c +0
-0
net/eth-uclass.c static int eth_post_probe(struct udevice *dev) · line 542
Quoted 5 lines
net/eth-uclass.c +0
-2@@ -538,8 +538,6 @@ static int eth_post_probe(struct udevice *dev)memcpy (pdata->enetaddr, env_enetaddr,ARP_HLEN ); }else if (is_valid_ethaddr (pdata->enetaddr)) {eth_env_set_enetaddr_by_index ("eth" , dev->seq, pdata->enetaddr); -printf ("\nWarning: %s using MAC address from ROM\n" , - dev->name);
I also find this warning misleading:
PATCH 1/1 net: eth-uclass: Remove warning about ROM MAC address
In reply to Soeren MochQuoted 4 lines · Soeren Moch
Using a MAC address from ROM storage is the normal case for most ethernet hardware. Why should we warn about this?
Signed-off-by Soeren Moch <[email protected]>
Some months ago I came up with the very same patch and I currently have it in my local fork with the description "Reading the MAC address from ROM is often a standard use case and should not produce a warning".
Therefore I'm supporting Soeren's and Fabio's point of view here and I'm in favor of merging this patch or if preferred, change the printf() to debug().
Quoted 28 lines
---
Cc: Joe Hershberger <[email protected]>
Cc: u-boot at lists.denx.de--- net/eth-uclass.c | 2 -- 1 file changed, 2 deletions(-)net/eth-uclass.c +0
-3@@ -538,8 +538,6 @@ static int eth_post_probe(struct udevice *dev)memcpy (pdata->enetaddr, env_enetaddr,ARP_HLEN ); }else if (is_valid_ethaddr (pdata->enetaddr)) {eth_env_set_enetaddr_by_index ("eth" , dev->seq, pdata->enetaddr); -printf ("\nWarning: %s using MAC address from ROM\n" , - dev->name); }else if (is_zero_ethaddr (pdata->enetaddr) || !is_valid_ethaddr (pdata->enetaddr)) {#ifdef CONFIG_NET_RANDOM_ETHADDR --2.17.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
PATCH 1/1 net: eth-uclass: Remove warning about ROM MAC address
Hi Joe,
Quoted 11 lines · Schrempf Frieder
Quoted 4 lines · Soeren Moch
Using a MAC address from ROM storage is the normal case for most ethernet hardware. Why should we warn about this?
Signed-off-by Soeren Moch <[email protected]>Some months ago I came up with the very same patch and I currently have it in my local fork with the description "Reading the MAC address from ROM is often a standard use case and should not produce a warning".
Quoted 5 lines
Therefore I'm supporting Soeren's and Fabio's point of view here and I'm in favor of merging this patch or if preferred, change the
printf()todebug().Reviewed-by Frieder Schrempf <[email protected]>
Any feedback, please?
PATCH 1/1 net: eth-uclass: Remove warning about ROM MAC address
Hi Joe,
Ping
Quoted 23 lines · Fabio Estevam
Hi Joe,
Quoted 11 lines · Schrempf Frieder
Quoted 4 lines · Soeren Moch
Using a MAC address from ROM storage is the normal case for most ethernet hardware. Why should we warn about this?
Signed-off-by Soeren Moch <[email protected]>Some months ago I came up with the very same patch and I currently have it in my local fork with the description "Reading the MAC address from ROM is often a standard use case and should not produce a warning".
Quoted 5 lines
Therefore I'm supporting Soeren's and Fabio's point of view here and I'm in favor of merging this patch or if preferred, change the
printf()todebug().Reviewed-by Frieder Schrempf <[email protected]>Any feedback, please?
PATCH 1/1 net: eth-uclass: Remove warning about ROM MAC address
Quoted 29 lines · Fabio Estevam
Hi Joe,
Ping
Quoted 23 lines · Fabio Estevam
Hi Joe,
Quoted 11 lines · Schrempf Frieder
Quoted 4 lines · Soeren Moch
Using a MAC address from ROM storage is the normal case for most ethernet hardware. Why should we warn about this?
Signed-off-by Soeren Moch <[email protected]>Some months ago I came up with the very same patch and I currently have it in my local fork with the description "Reading the MAC address from ROM is often a standard use case and should not produce a warning".
Quoted 5 lines
Therefore I'm supporting Soeren's and Fabio's point of view here and I'm in favor of merging this patch or if preferred, change the
printf()todebug().Reviewed-by Frieder Schrempf <[email protected]>Any feedback, please?
Traditionally the env was the source of truth for the MAC, so using the ROM was a fall-back if the env didn't have one. But times change, I guess. I'll pull this into my next PR.