mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] USB: announce bcdDevice as well as idVendor, idProduct.
@ 2018-03-24  0:33 Benson Leung
  2018-03-24  0:48 ` Andrew Chant
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Benson Leung @ 2018-03-24  0:33 UTC (permalink / raw)
  To: gregkh, linux-usb, linux-kernel; +Cc: achant, bleung, Benson Leung

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 <bleung@chromium.org>
---
 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-03-26 18:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-24  0:33 [PATCH] USB: announce bcdDevice as well as idVendor, idProduct Benson Leung
2018-03-24  0:48 ` Andrew Chant
2018-03-24  1:08   ` Andrew Chant
2018-03-24  1:34     ` Benson Leung
2018-03-24  1:31 ` [PATCH v2] " Benson Leung
2018-03-24 16:06   ` Alan Stern
2018-03-24 17:43     ` Benson Leung
2018-03-24 17:40 ` [PATCH v3] " Benson Leung
2018-03-26 18:27   ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome