aboutsummaryrefslogtreecommitdiffstats
path: root/usb/always-announce-new-usb-devices.patch
blob: cb4c17c76dc578893bc1b5edafa74e821340b12c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From: Greg Kroah-Hartman <gregkh@suse.de>
Subject: USB: always announce a device has been added to the system

Distros (like SuSE) want to know this information, to make it easier
to handle support issues.

Odds are no one wants this in mainline, as it clutters up the syslog...

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/core/hub.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

--- gregkh-2.6.orig/drivers/usb/core/hub.c
+++ gregkh-2.6/drivers/usb/core/hub.c
@@ -1288,7 +1288,6 @@ static int choose_configuration(struct u
 	return i;
 }
 
-#ifdef DEBUG
 static void show_string(struct usb_device *udev, char *id, char *string)
 {
 	if (!string)
@@ -1296,10 +1295,6 @@ static void show_string(struct usb_devic
 	dev_printk(KERN_INFO, &udev->dev, "%s: %s\n", id, string);
 }
 
-#else
-static inline void show_string(struct usb_device *udev, char *id, char *string)
-{}
-#endif
 
 
 #ifdef	CONFIG_USB_OTG
@@ -1344,7 +1339,10 @@ int usb_new_device(struct usb_device *ud
 	udev->serial = usb_cache_string(udev, udev->descriptor.iSerialNumber);
 
 	/* Tell the world! */
-	dev_dbg(&udev->dev, "new device strings: Mfr=%d, Product=%d, "
+	dev_info(&udev->dev, "new device found, idVendor=%04x, idProduct=%04x\n",
+		le16_to_cpu(udev->descriptor.idVendor),
+		le16_to_cpu(udev->descriptor.idProduct));
+	dev_info(&udev->dev, "new device strings: Mfr=%d, Product=%d, "
 			"SerialNumber=%d\n",
 			udev->descriptor.iManufacturer,
 			udev->descriptor.iProduct,