On Wed, 14 Jun 2006, Greg KH wrote: > > usb_generic doesn't bind to a device until the device is registered. > > This means that all the early dev_info and dev_dbg log messages in > > usb_new_device, hub_port_init, and so on, don't have a device driver name. > > > > Maybe I should replace those macros with something like "usb_info" and > > "usb_dbg" that would always print "usb" for the driver name. > > There's a patch floating around lkml that changes the way dev_* works, > so that if there is no driver bound, it prints the bus name. So for > this, it would show "usb", which is what we want. Try it out and if it > works, I'll be glad to add it.
It's bloody difficult to do any serious searches through the mailing list archives. If you know of a good way to do it, I'd like to hear what it is. In this case, you probably mean something like this: --- usb-2.6.orig/include/linux/device.h +++ usb-2.6/include/linux/device.h @@ -404,7 +404,8 @@ extern void firmware_unregister(struct s /* debugging and troubleshooting/diagnostic helpers. */ #define dev_printk(level, dev, format, arg...) \ - printk(level "%s %s: " format , (dev)->driver ? (dev)->driver->name : "" , (dev)->bus_id , ## arg) + printk(level "%s %s: " format , (dev)->driver ? (dev)->driver->name : \ + (dev)->bus->name , (dev)->bus_id , ## arg) #ifdef DEBUG #define dev_dbg(dev, format, arg...) \ Is this right? It definitely will solve the problem I was referring to. Alan Stern _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel