From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 1 Oct 2020 14:17:50 -0400 Subject: [PATCH V2] net: smc911x: Automatically Update ethaddr with MAC In-Reply-To: <815b267f-4c15-5743-c50a-e779b5192a58@denx.de> References: <20200818131902.18533-1-aford173@gmail.com> <20201001140941.GJ14816@bill-the-cat> <815b267f-4c15-5743-c50a-e779b5192a58@denx.de> Message-ID: <20201001181750.GU14816@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Oct 01, 2020 at 07:48:32PM +0200, Marek Vasut wrote: > On 10/1/20 4:09 PM, Tom Rini wrote: > > On Tue, Aug 18, 2020 at 08:19:02AM -0500, Adam Ford wrote: > > > >> The ethernet controller can read the MAC from EEPROM and display it, > >> but if ethaddr is not set, the ethernet is still unavailable. > >> > >> This patch checks will automatically set the MAC address if it has > >> not already been set. > >> > >> Signed-off-by: Adam Ford > >> Acked-by: Joe Hershberger > > > > Applied to u-boot/next, thanks! > > Note that this breaks every single setup where smc911x is not primary > ethernet. On systems where smc911x is secondary ethernet, you need to > set eth1addr and so on, so please do fix that. > > Also, this kind of ethXaddr update should happen in the ethernet core > instead, drivers shouldn't really modify environment, no ? Interesting points. So, if smc911x is not the primary ether device, something else will have already set "ethaddr", most likely. We do have both the common case where "ethaddr" (and "eth1addr" and so forth) are set. Adam, when exactly did you run in to the case where ethaddr wasn't set correctly? Was it on a non-DM_ETH case? To Marek's last point, we do have drivers that set ethaddr/ethXaddr, but that's in the non-DM_ETH case. Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: