From: Mike Frysinger Date: Mon, 16 Feb 2009 19:12:10 -0500 Subject: [U-Boot] [PATCH 02/27] doc/README.enetaddr: document proper MAC usage In-Reply-To: <20090216223854.62C66832E893@gemini.denx.de> References: <1234596190-524-1-git-send-email-vapier@gentoo.org> <1234596190-524-3-git-send-email-vapier@gentoo.org> <20090216223854.62C66832E893@gemini.denx.de> Message-ID: <200902161912.11799.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday 16 February 2009 17:38:54 Wolfgang Denk wrote: > In message Mike Frysinger wrote: > > +Here are the places where MAC addresses might be stored: > > + > > + - board-specific location (eeprom, dedicated flash, ...) > > + Note: only used when mandatory due to hardware design etc... > > + > > + - environment ("ethaddr", "eth1addr", ...) (see CONFIG_ETHADDR) > > + Note: this is the preferred way to permanently store MAC addresses > > + > > + - ethernet data (struct eth_device -> enetaddr) > > + Note: these are temporary copies of the MAC address which exist only > > + after the respective init steps have run and only to make usage > > + in other places easier (to avoid constant env lookup/parsing) > > - struct bd_info and/or device tree > Note: these are temporary copies of the MAC address only foir > the purpose to pass this information to an OS kernel we are > about to boot > > > +The common environment code will take care of passing environment > > changes to +the global data. This happens automatically whenever > > setenv() updates the +relevant ethaddr variables. > > Didn't we just remove the MAC address information from the global > data? > > > +Any other common code that wishes to access the MAC address should then > > query +the global data directly. No one should be looking in the > > environment for any +addresses. > > Is this still valid? erm, i updated the file in places i remembered, but didnt give it a complete top-to-bottom look over after the last discussion. ive fixed up the things you pointed out, thanks. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20090216/d7a34961/attachment-0001.pgp