ChangeSet 1.1608.24.43, 2004/03/03 17:01:21-08:00, david-b@pacbell.net

[PATCH] USB: HCD names, for better troubleshooting

See the attached patch -- which restores the behavior of usbcore
to what it had before "struct device.name" went away, in the
(typical) case of PCI devices.

It makes the root hubs say what hardware they're actually using,
in the reasonably typical case that PCI names are in use, rather
than being just generic (and hence almost useless) strings.  This
sort of information can really help when troubleshooting.


 drivers/usb/core/hcd-pci.c |    4 ++++
 1 files changed, 4 insertions(+)


diff -Nru a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
--- a/drivers/usb/core/hcd-pci.c	Tue Mar 16 15:04:05 2004
+++ b/drivers/usb/core/hcd-pci.c	Tue Mar 16 15:04:05 2004
@@ -147,8 +147,12 @@
 	hcd->driver = driver;
 	hcd->description = driver->description;
 	hcd->self.bus_name = pci_name(dev);
+#ifdef CONFIG_PCI_NAMES
+	hcd->product_desc = dev->pretty_name;
+#else
 	if (hcd->product_desc == NULL)
 		hcd->product_desc = "USB Host Controller";
+#endif
 	hcd->self.controller = &dev->dev;
 
 	if ((retval = hcd_buffer_create (hcd)) != 0) {
