[U-Boot] [PATCH 06/14] net: core: Using an ethernet address from ROM is not bad

Michal Simek michal.simek at xilinx.com
Mon Nov 28 08:59:51 CET 2016


On 25.11.2016 16:30, Olliver Schinagl wrote:
> Currently we print a warning if the MAC address is read from
> ROM/Hardware. This should not be concidered a bad or erronous thing. A
> MAC address should come either from the hardware (ROM) or may be
> set/overriden in the environment. Neither is a warning or error case.
> 
> Worthy of a warning is the case where both are set, so the user is
> atleast aware something special is happening.
> 
> Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
> ---
>  net/eth-uclass.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/net/eth-uclass.c b/net/eth-uclass.c
> index 9703bea..aca3f6d 100644
> --- a/net/eth-uclass.c
> +++ b/net/eth-uclass.c
> @@ -510,8 +510,6 @@ static int eth_post_probe(struct udevice *dev)
>  		memcpy(pdata->enetaddr, env_enetaddr, ARP_HLEN);
>  	} else if (is_valid_ethaddr(pdata->enetaddr)) {
>  		eth_setenv_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)) {
>  #ifdef CONFIG_NET_RANDOM_ETHADDR
>  		net_random_ethaddr(pdata->enetaddr);
> 

User should be aware if mac is read from ROM or something else.
Is there a way how to read it without this message to be generated?

Thanks,
Michal



More information about the U-Boot mailing list