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

Joe Hershberger joe.hershberger at gmail.com
Wed Nov 30 20:23:38 CET 2016


On Fri, Nov 25, 2016 at 9:30 AM, Olliver Schinagl <oliver at schinagl.nl> 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);

I would prefer to see this go away in the same patch that adds the
source to other prints.

>         } else if (is_zero_ethaddr(pdata->enetaddr)) {
>  #ifdef CONFIG_NET_RANDOM_ETHADDR
>                 net_random_ethaddr(pdata->enetaddr);
> --
> 2.10.2
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot


More information about the U-Boot mailing list