From: Wolfgang Denk Date: Mon, 25 Apr 2011 01:50:37 +0200 Subject: [U-Boot] [PATCH 2/9] mvgbe: Support preserving the existing MAC address In-Reply-To: <1300391223-11879-3-git-send-email-mspang@csclub.uwaterloo.ca> References: <1300391223-11879-1-git-send-email-mspang@csclub.uwaterloo.ca> <1300391223-11879-3-git-send-email-mspang@csclub.uwaterloo.ca> Message-ID: <20110424235037.AC159D5269F@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Michael Spang, In message <1300391223-11879-3-git-send-email-mspang@csclub.uwaterloo.ca> you wrote: > The MVGBE driver either gets the MAC from the environment, or invents > one. This allows the driver to leave the existing address alone in > case it is initialized before U-Boot starts. Who or what would be doing that? > while (!eth_getenv_enetaddr(s, dev->enetaddr)) { > +#if defined(CONFIG_PRESERVE_LOCAL_MAC) > + port_uc_addr_get(dmvgbe->regs, dmvgbe->dev.enetaddr); > +#else For consistency, should this not be port_uc_addr_get(dmvgbe->regs, dev->enetaddr); ? > /* Generate Private MAC addr if not set */ > dev->enetaddr[0] = 0x02; > dev->enetaddr[1] = 0x50; > @@ -734,6 +753,7 @@ error1: > dev->enetaddr[4] = get_random_hex(); > dev->enetaddr[5] = get_random_hex(); > #endif > +#endif > eth_setenv_enetaddr(s, dev->enetaddr); > } And please add documentation for the new CONFIG_PRESERVE_LOCAL_MAC to the README. 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 Q: What do you get when you cross an ethernet with an income statement? A: A local area networth.