[Removed the Xen people from the CC: list, since this probably won't interest them.]
On Fri, 9 Dec 2005, Greg KH wrote: > > There are two difficult aspects. Since usb_generic_driver gets registered > > first, it will always be probed first and so no other driver will have a > > chance. Is there any simple way we can alter this? Make > > usb_register_driver always move usb_generic_driver to the end of the > > driver list? > > Ick, that would be ugly. But I think we manually bind that driver to > the device before we register it and don't let the core do the binding. > So we could have some logic there of our own. It would be easiest to let the driver core do the binding. No reason not to, AFAICS. > > (In fact, should the driver core try to define static -- or even dynamic! > > -- priorities for drivers? If probing was always done in priority order, > > it might help solve some other problems as well...) > > We've wanted this for a long time. But the priorities would have to be > on the bus level, as they are the portion of code that knows how to > match things up. I was thinking of something like this: Add an integer-valued priority field to struct device_driver, and have the driver core keep the list of all drivers registered for a bus in priority order. Then probing would automatically try higher-priority drivers before lower-priority ones. The actual priority values would be assigned by bus-specific code; all the core needs to know about is the ordering. Perhaps this could even be generalized to control the order in which drivers are loaded by the hotplug system. But that's a separate matter... Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel