[U-Boot] [PATCH] net: eth-uclass: Remove warning about ROM MAC address

Soeren Moch smoch at web.de
Fri Oct 11 08:07:26 UTC 2019


Hi Joe,

On 11.10.19 05:06, Joe Hershberger wrote:
> Hi Soeren,
>
> On Thu, Oct 10, 2019 at 6:01 PM Soeren Moch <smoch at web.de> wrote:
>> 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
>
> Cheers,
> -Joe
>
>> Signed-off-by: Soeren Moch <smoch at web.de>
>> ---
>> Cc: Joe Hershberger <joe.hershberger at ni.com>
>> Cc: u-boot at lists.denx.de
>> ---
>>  net/eth-uclass.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/net/eth-uclass.c b/net/eth-uclass.c
>> index 3bd98b01ad..8b29de37bb 100644
>> --- a/net/eth-uclass.c
>> +++ b/net/eth-uclass.c
>> @@ -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




More information about the U-Boot mailing list