All of lore.kernel.org
 help / color / mirror / Atom feed
From: Premi, Sanjeev <premi@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] omap3evm: Set environment variable 'ethaddr'
Date: Fri, 2 Sep 2011 19:21:19 +0530	[thread overview]
Message-ID: <B85A65D85D7EB246BE421B3FB0FBB5930257371E07@dbde02.ent.ti.com> (raw)
In-Reply-To: <20110902134340.6C74F203630@gemini.denx.de>

> -----Original Message-----
> From: Wolfgang Denk [mailto:wd at denx.de] 
> Sent: Friday, September 02, 2011 7:14 PM
> To: Premi, Sanjeev
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] [PATCH] omap3evm: Set environment 
> variable 'ethaddr'
> 
> Dear Sanjeev Premi,
> 
> In message <1314967433-14199-1-git-send-email-premi@ti.com> you wrote:
> > It is now responsibility of the board specific init
> > code to set the environment variable corresponding
> > to the MAC address.
> > 
> > Signed-off-by: Sanjeev Premi <premi@ti.com>
> 
> This looks all wrong to me.  In U-Boot, the "ethaddr" environment
> variable is normally the primary storage for the MAC address.  Only
> when this variable is not set, other potential storage locations may
> be referenced to initialize this value.
> 
> Your patch always and unconditionally overwrites any existing
> "ethaddr" settings.  This is not acceptable.

For the EVM, MAC address is always probed from the chip. Hence, I
assumed it safe to set the ethaddr - without checking for env var.
It was unlikely that someone would be setting it - to different
value.

But, I see your point that I should be checking for existence of a
valid ethaddr before setting/overwriting it.

~sanjeev

> 
> Best regards,
> 
> Wolfgang Denk
> 
> -- 
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> Build a system that even a fool can use and only a fool will want  to
> use it.
> 

  reply	other threads:[~2011-09-02 13:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-02 12:43 [U-Boot] [PATCH] omap3evm: Set environment variable 'ethaddr' Sanjeev Premi
2011-09-02 13:43 ` Wolfgang Denk
2011-09-02 13:51   ` Premi, Sanjeev [this message]
2011-09-02 22:07     ` Wolfgang Denk
2011-09-03  7:28       ` Premi, Sanjeev

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=B85A65D85D7EB246BE421B3FB0FBB5930257371E07@dbde02.ent.ti.com \
    --to=premi@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.