Commit 118d79a8 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[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.
parent 07fd2b87
......@@ -147,8 +147,12 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment