public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH] defconfig: espressobin: enable NET_RANDOM_ETHADDR
Date: Mon, 21 Sep 2020 11:03:13 -0400	[thread overview]
Message-ID: <20200921150313.GL14816@bill-the-cat> (raw)
In-Reply-To: <20200921133114.wojf5ndsr7j3emsr@pali>

On Mon, Sep 21, 2020 at 03:31:14PM +0200, Pali Roh?r wrote:
> On Monday 21 September 2020 15:21:44 Marek Behun wrote:
> > On Mon, 21 Sep 2020 15:05:22 +0200
> > Pali Roh?r <pali@kernel.org> wrote:
> > 
> > > Moreover CONFIG_NET_RANDOM_ETHADDR introduce another issue. In case
> > > there is no valid mac address, U-Boot generates one. But it does not
> > > pass this generates mac address to kernel and therefore kernel generates
> > > another new random mac address.
> > 
> > I think it does :) At least on A3720, if the net controller has MAC
> > address set by U-Boot, I think the same one will be used by kernel.
> 
> I mean the case when mac address is not already set in env. The case
> when CONFIG_NET_RANDOM_ETHADDR code configure mac address, when env
> variable is not set.
> 
> U-Boot set mac address into FDT file only from env.
> 
> turris_mox.c code calls eth_env_set_enetaddr() to set env with correct
> mac address.

If the random address that U-Boot generates is NOT being sent to the
kernel, that's a bug to go and fix.  That's not usually the case for
random MAC addresses generated in U-Boot.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200921/9b8436e7/attachment.sig>

  reply	other threads:[~2020-09-21 15:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08  6:35 [PATCH] defconfig: espressobin: enable NET_RANDOM_ETHADDR Andre Heider
2020-09-08  7:42 ` Pali Rohár
2020-09-08  8:14   ` Andre Heider
2020-09-08 12:52     ` Tom Rini
2020-09-08 22:38       ` Pali Rohár
2020-09-11 11:55         ` Marek Behún
2020-09-11 15:52           ` Andre Heider
2020-09-11 16:22             ` Marek Behún
2020-09-11 16:47               ` Andre Heider
2020-09-11 17:10                 ` Tom Rini
2020-09-11 17:16                   ` Dennis Gilmore
2020-09-13  9:21                     ` [EXT] " Kostya Porotchkin
2020-09-21  7:50                       ` Stefan Roese
2020-09-21 13:05               ` Pali Rohár
2020-09-21 13:21                 ` Marek Behun
2020-09-21 13:31                   ` Pali Rohár
2020-09-21 15:03                     ` Tom Rini [this message]
2020-09-21 15:10 ` [EXT] " Kostya Porotchkin
2020-09-24 10:36 ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200921150313.GL14816@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox