From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?= Date: Mon, 6 Aug 2012 21:02:26 +0200 (CEST) Subject: [U-Boot] [QUESTION] "ethaddr" env. var. vs. dev->enetaddr In-Reply-To: <261180882.2030378.1344278963347.JavaMail.root@advansee.com> Message-ID: <5305998.2030837.1344279746848.JavaMail.root@advansee.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi all, There's a lot of stuff in U-Boot relying on ethaddr being set, e.g. the bdinfo command, or the linklocal command because of seed_mac. If ethaddr is not set, bdinfo will report exactly that, but linklocal will wait indefinitely without displaying anything. The issue is that dev->enetaddr may be set even if ethaddr is not, e.g. through imx_get_mac_from_fuse. eth_write_hwaddr uses a valid ethaddr to override an already set dev->enetaddr, but it does not require ethaddr to be set. Hence, shouldn't the users of ethaddr rather use dev->enetaddr, or is ethaddr really supposed to be required (bug or feature)? If ethaddr is required, should it be up to the boards to set if for cases like imx_get_mac_from_fuse, or should eth_write_hwaddr set it automatically if dev->enetaddr is valid but ethaddr is unset or invalid? Best regards, Beno?t