From patchwork Mon Mar 18 12:31:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ismael Luceno Cortes X-Patchwork-Id: 1057862 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=silicon-gears.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44NFtC2J2Gz9s5c for ; Mon, 18 Mar 2019 23:31:45 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id DBA4AC21E56; Mon, 18 Mar 2019 12:31:40 +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=none 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 68809C21C3F; Mon, 18 Mar 2019 12:31:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AAE41C21C3F; Mon, 18 Mar 2019 12:31:37 +0000 (UTC) Received: from mx1.silicon-gears.com (mx1.silicon-gears.com [81.47.169.96]) by lists.denx.de (Postfix) with ESMTPS id 5B721C21C38 for ; Mon, 18 Mar 2019 12:31:37 +0000 (UTC) From: Ismael Luceno Cortes To: "u-boot@lists.denx.de" Thread-Topic: [PATCH v2] usb: host: Print device name when scanning Thread-Index: AQHU3YaFIAi4aklROUSFMuYrCGSotA== Date: Mon, 18 Mar 2019 12:31:32 +0000 Message-ID: <20190318123126.5714-1-ismael.luceno@silicon-gears.com> Accept-Language: en-GB, es-ES, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-TM-AS-User-Approved-Sender: Yes;No X-TMASE-Result: 10--4.589800-10.000000 X-TMASE-MatchedRID: oRmF/momRNHS5WmHt3l/xrMjW/sniEQKC/ExpXrHizxWLCpfN4pF7Nn7 b/+Y15IvkOti/7QqGXWNl9/g2NS74bHErqwG73BuKaMQ6tw7oDL4uJ1REX4MHWA/TyHFwq2xGbD Dze5kxRtJrn18GuYI5X8mA3sDDq0AtVC7UY1n6yLGVuWouVipciA0mI/UuhFOtsrLSSAcaNbP5P 2DeX+xKHA6qwwsUP0+9/LOzOA+cHN3LUcBdGu2AQMBaQaxmNOMkFfAkPZtlCYTnhZqrJwonaeQx cTv7bs1lEkiTxESgghtRtLHQNsneOxR1uD0APJHuqy7mgT409o= X-IMSS-DKIM-White-List: No;No X-TMASE-SNAP-Result: 1.821001.0001-0-1-12:0,22:0,33:0,34:0-0 Cc: Marek Vasut Subject: [U-Boot] [PATCH v2] usb: host: Print device name when scanning 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The name assigned to the USB host controller interface is a better indicator than the counter currently in use (which has no meaning other than being the order in which the interface is found). Example of the original output: > USB0: USB EHCI 1.10 > scanning bus 0 for devices... 2 USB Device(s) found > scanning usb for storage devices... 1 Storage Device(s) found Patched output: > USB0(usb@ee080100): USB EHCI 1.10 > scanning bus 0 for devices... 2 USB Device(s) found > scanning usb for storage devices... 1 Storage Device(s) found Signed-off-by: Ismael Luceno --- Notes: Changes since v1: - Improved commit message. drivers/usb/host/usb-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 9ba5e5bc261a16f51662490da0cf620dc7f29013 diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c index 611ea97a72..0575f5393b 100644 --- a/drivers/usb/host/usb-uclass.c +++ b/drivers/usb/host/usb-uclass.c @@ -255,7 +255,7 @@ int usb_init(void) uclass_foreach_dev(bus, uc) { /* init low_level USB */ - printf("USB%d: ", count); + printf("USB%d(%s): ", count, bus->name); count++; #ifdef CONFIG_SANDBOX