From patchwork Mon May 15 08:02:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olliver Schinagl X-Patchwork-Id: 762453 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3wRJhc1yrqz9s4q for ; Mon, 15 May 2017 21:46:56 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=schinagl.nl header.i=@schinagl.nl header.b="kFzuEvX7"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id 0E34AC221C9; Mon, 15 May 2017 11:34:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=KHOP_BIG_TO_CC, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5C2F8C22169; Mon, 15 May 2017 11:12:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 28132C21C33; Mon, 15 May 2017 08:03:00 +0000 (UTC) Received: from 7of9.schinagl.nl (7of9.schinagl.nl [62.251.20.244]) by lists.denx.de (Postfix) with ESMTPS id B1749C21C4A for ; Mon, 15 May 2017 08:03:00 +0000 (UTC) Received: from um-mbp-306.cloud.ultimaker.com (static-98-101-100-159.thenetworkfactory.nl [159.100.101.98]) by 7of9.schinagl.nl (Postfix) with ESMTPA id 21E7DC09B2; Mon, 15 May 2017 10:02:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=schinagl.nl; s=7of9; t=1494835380; bh=hv3rKkkwJSFLAQpyjyNo4VphKtd3PNhnJq6mwyKpkTE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=kFzuEvX7PbGNIIAY8SUb8auNiHTWEqorkUYXtfgaPRbjXkV7WoTkZNeW3x+CgVMi2 mrSFeiMsqCemdhpJrN5+DgNbxXltySMuMoYvIwrcHDIu3EYIAuTYJLvfrv/Hrt1BRi c2hk0yOsX27VSWQ2cWarSnkYyZnz4f/PPJfaq5TE= From: Olliver Schinagl To: Jagan Teki , Maxime Ripard , Hans de Goede , Simon Glass , Iain Paton , FUKAUMI Naoki , Olliver Schinagl , Marcus Cooper , Ian Campbell , Chen-Yu Tsai , Jelle de Jong , Adam Sampson , Stefan Roese , Phil Han , Joe Hershberger Date: Mon, 15 May 2017 10:02:26 +0200 Message-Id: <20170515080244.21345-11-oliver@schinagl.nl> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170515080244.21345-1-oliver@schinagl.nl> References: <20170515080244.21345-1-oliver@schinagl.nl> X-Mailman-Approved-At: Mon, 15 May 2017 11:12:25 +0000 Cc: oliver+list@schinagl.nl, Jernej Skrabec , Mugunthan V N , dev@linux-sunxi.org, Andre Przywara , Icenowy Zheng , u-boot@lists.denx.de Subject: [U-Boot] [PATCHv6 10/28] net: core: Inform the user of the device MAC address X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" In certain conditions we currently print the MAC address. For example a warning when a random mac address is in use or a missmatch between HW and ENV. If all things went well however (but even if there is a miss-match) we do not inform the user what the final MAC address of the device is. Lets print the final MAC address of the device with which it has been setup. Signed-off-by: Olliver Schinagl Acked-by: Joe Hershberger --- net/eth-uclass.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/net/eth-uclass.c b/net/eth-uclass.c index c3cc3152a2..781376955a 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -413,11 +413,12 @@ int eth_initialize(void) } bootstage_mark(BOOTSTAGE_ID_NET_ETH_INIT); + putc('\n'); do { - if (num_devices) - printf(", "); + struct eth_pdata *pdata = dev->platdata; - printf("eth%d: %s", dev->seq, dev->name); + printf("eth%d: %s [%pM]\n", dev->seq, dev->name, + pdata->enetaddr); if (ethprime && dev == prime_dev) printf(" [PRIME]"); @@ -525,6 +526,8 @@ static int eth_post_probe(struct udevice *dev) #endif } + printf("%s ", dev->name); + return 0; }