From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Walle Date: Tue, 8 Nov 2011 23:45:12 +0100 Subject: [U-Boot] [PATCH] mvgbe: remove setting of ethaddr within the driver In-Reply-To: <201111081549.50843.vapier@gentoo.org> References: <1320703689-4879-1-git-send-email-michael@walle.cc> <45fd92b472c944e2cb9ebb409488ccfc.squirrel@ssl.serverraum.org> <201111081549.50843.vapier@gentoo.org> Message-ID: <201111082345.12914.michael@walle.cc> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am Dienstag 08 November 2011, 21:49:49 schrieb Mike Frysinger: > On Tuesday 08 November 2011 12:34:17 Michael Walle wrote: > > Am Di, 8.11.2011, 16:17 schrieb Wolfgang Denk: > > > Michael Walle wrote: > > >> >> +#define CONFIG_ETH_ADDR 02:50:43:00:00:01 > > >> > > > >> > NAK to this. board configs are not allow to hardcode MACs. > > >> > > >> mh, so why is there a CONFIG_ETH_ADDR macro? is it deprecated? > > >> README.enetaddr explicitly refers to that config option. > > > > > > There are situations where it cannot be helped, like when programming > > > the U-Boot image into a ROM (yes, a real ROM that cannot be changed > > > any more by software alone). > > > > > > But in almost all normal situations this must not be used. In any > > > case, we will not accept it into mainline. > > > > I have a Buffalo Linkstation Pro LS-XHL for which i plan to submit a BSP. > > On this board, the MAC address is saved within the environment, which is > > in turn stored in flash. Additionally this board does not have a serial > > port, thus the only available console is the network console. > > > > If someone will mess up the environment, it is possible to clear it by > > holding a button upon powerup. Atm i have the CONFIG_ETH_ADDR set to a > > default MAC address to be able to use the network console with the > > default environment. To restore the original MAC address, a user have to > > manually replace ethaddr with the one printed on the case. > > > > But now, if i can't use the CONFIG_ETH_ADDR, i think i'm stuck :) Or do i > > miss something? (Yeah there may be the MAC randomization, if accepted). > > the "default" MAC address would collide with other Buffalo stations which > have the "default" MAC address yeah of course, but it is only a recovery mechanism. i would be happy with a generated mac address, too. > by default, ethaddr is not writable, so people can't simply "set ethaddr > xxx" to screw it up. well a user could screw it up in many other ways too ;) there are plenty of boards which has CONFIG_ETHADDR and CONFIG_OVERWRITE_ETHADDR_ONCE set. This should exactly be the configuration i need, too. btw only ethaddr is protected and not ethNaddr, which is a bug imho ;) -- Michael