From mboxrd@z Thu Jan 1 00:00:00 1970 From: Premi, Sanjeev Date: Fri, 2 Sep 2011 19:21:19 +0530 Subject: [U-Boot] [PATCH] omap3evm: Set environment variable 'ethaddr' In-Reply-To: <20110902134340.6C74F203630@gemini.denx.de> References: <1314967433-14199-1-git-send-email-premi@ti.com> <20110902134340.6C74F203630@gemini.denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.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 > > 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. >