Received: by 10.213.65.68 with SMTP id h4csp816612imn; Fri, 23 Mar 2018 17:36:16 -0700 (PDT) X-Google-Smtp-Source: AG47ELtI3Lu79v2ZFW/asIurPNvYDImaZnva3+Nijxt0vCffI+y0k1yWP/U861+nuxGBA/W+foK4 X-Received: by 2002:a17:902:2468:: with SMTP id m37-v6mr30673318plg.388.1521851776483; Fri, 23 Mar 2018 17:36:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521851776; cv=none; d=google.com; s=arc-20160816; b=XXtY98mMgJ8tEYkuxrU8wRwuROMogaRM2VCboLd3cFgZhemwohLdGvvgg7X5+5DLFU tW9dNUBwXsVejnMx6475BSvM4dK7nKJ+pQK0rSFCs5keegnS25p8T5RdZJoGafcGglzV Y5tBihRQL16HmzCE7iz2heaPd8RdOsnOo26T0AzmsHBnWf5P4/e/p4rTia3Tc6NrSJJ1 7UvAGP26eo2afKS7AFKxFMBqDtlK0qNFqZXBG30B0lSbcs2OrAUcImzGMIGww/ivgoT6 DpgT2CMgT7nkEd0rnWSm7jegSFVBIq5iYXoWhS5pJ/EGMU17+q6IDsDeV2QxqZhErS9R gY6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=gPZaB5qr2moTyQ8TFRhuwRXXG/fsybkfiLIPgfvMkg8=; b=UjfcIunY4l+OEmbkiK7erurjetgD2Lyx8yK5vRYIv5PD6X5ok9vHFg7N+eDimD77pg E0/HOLQP12iA/QlOZcH340PukZKsght78IPSdzHDf26iWm9u60VsHryltqySr+QBaXem OJOA2YN321ze2UlNWGFlwU6NXZQkcNAqc2imgvYM/lqlDUAuJc6op3p385liaE4lNFVR yFMd8jwSH/OCnvRFXSMVZpBd+BILHq/mdSpxp1klDMAHoBmglikA6G9oc9ssQi5UCxKi ayx+kt9WWYLWIBeKkIPFtuEu4oZA15EljruWOVjfpTyPeUqcYGc1gHLT9dNpodvleznA Irkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hxM1RjwT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n22si6757450pgc.121.2018.03.23.17.36.01; Fri, 23 Mar 2018 17:36:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hxM1RjwT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752048AbeCXAd5 (ORCPT + 99 others); Fri, 23 Mar 2018 20:33:57 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:41474 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751632AbeCXAdz (ORCPT ); Fri, 23 Mar 2018 20:33:55 -0400 Received: by mail-pf0-f195.google.com with SMTP id a11so1996217pff.8 for ; Fri, 23 Mar 2018 17:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=gPZaB5qr2moTyQ8TFRhuwRXXG/fsybkfiLIPgfvMkg8=; b=hxM1RjwTqnKCOKJnizCzLAf49arXf0U2kssfbijbjoFnyCwr5vlB7f1rKVWvpa9TV4 Gd/BZixoku2GPObYhuG2YeOizzExjfBTE/mUwTOz7I5a0xGtIYk60VfmEGgpXlpEPu/y YVUbFoQDFTqD/jV/cqMyggB27gq+NPp3g6aiM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=gPZaB5qr2moTyQ8TFRhuwRXXG/fsybkfiLIPgfvMkg8=; b=b3NVzhMKGlOqZD3QqqAOEwNU/q85ROw2BGO8MOH9BPezLx5BSofExuEv0FzlsvA/1s Q1hUvUgJOafjVh4ers842euY3uVFrRCFyLwSCpKU/Ioq2Y8Z5r6UnHA8xCrFOWAaWngS Y7SrDpnay/8IXsqMXPVoI1RQi0HAEMNNJcAHSg9DMjKpXQL5CfLmrAWNBHGJe01kX9sv GkfYtb9Z86PH5dnbgmB0qX8SuZtm+38k7m2yGn5NGc7orgF+M9QMVP/8X/pQMcpd6V2r wEBw3TIdnDABIA4t0vy63w3iaKjqvVfVIH3hidnrUfowURXfgf5r8dgOFFqFBNhDW8Ho f73g== X-Gm-Message-State: AElRT7FdPfxCpCVxSINxcL9pMWd6rT88PvbsdXRB2bQwWWHl+wgXp/QA Iye9pApr8+T8vIPJTidS06ixJw== X-Received: by 10.99.3.140 with SMTP id 134mr5962925pgd.92.1521851634944; Fri, 23 Mar 2018 17:33:54 -0700 (PDT) Received: from decatoncale.mtv.corp.google.com ([2620:0:1000:1501:e4e8:e3c6:19f1:ae51]) by smtp.gmail.com with ESMTPSA id z13sm21964996pfk.129.2018.03.23.17.33.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 17:33:53 -0700 (PDT) From: Benson Leung To: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: achant@google.com, bleung@google.com, Benson Leung Subject: [PATCH] USB: announce bcdDevice as well as idVendor, idProduct. Date: Fri, 23 Mar 2018 17:33:30 -0700 Message-Id: <20180324003330.180726-1-bleung@chromium.org> X-Mailer: git-send-email 2.17.0.rc0.231.g781580f067-goog Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Print bcdDevice which is used by vendors to identify different versions of the same product (or different versions of firmware). Adding this to the logs will be useful for support purposes. Signed-off-by: Benson Leung --- drivers/usb/core/hub.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index aaeef03c0d83..739d599814b6 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -2192,14 +2192,16 @@ static void show_string(struct usb_device *udev, char *id, char *string) static void announce_device(struct usb_device *udev) { - dev_info(&udev->dev, "New USB device found, idVendor=%04x, idProduct=%04x\n", - le16_to_cpu(udev->descriptor.idVendor), - le16_to_cpu(udev->descriptor.idProduct)); dev_info(&udev->dev, - "New USB device strings: Mfr=%d, Product=%d, SerialNumber=%d\n", - udev->descriptor.iManufacturer, - udev->descriptor.iProduct, - udev->descriptor.iSerialNumber); + "New USB device found, idVendor=%04x, idProduct=%04x, bcdDevice=%04x\n", + le16_to_cpu(udev->descriptor.idVendor), + le16_to_cpu(udev->descriptor.idProduct), + le16_to_cpu(udev->descriptor.bcdDevice)); + dev_info(&udev->dev, + "New USB device strings: Mfr=%d, Product=%d, SerialNumber=%d\n", + udev->descriptor.iManufacturer, + udev->descriptor.iProduct, + udev->descriptor.iSerialNumber); show_string(udev, "Product", udev->product); show_string(udev, "Manufacturer", udev->manufacturer); show_string(udev, "SerialNumber", udev->serial); -- 2.17.0.rc0.231.g781580f067-goog