On Thu, Jul 30, 2009 at 07:00:03PM +0530, Viral Mehta wrote: > Hi list, > > I am referring linux-2.6.30/Documentation/hotplug.txt And I am not able > to follow below things. > > [root@viral usb]# cat hotplug.txt > Most USB device drivers should pass these tables to the USB subsystem as > well as to the module management subsystem. > ... > ... > When the USB subsystem knows about a driver's device ID table, it's used > when > choosing drivers to probe(). The thread doing new device processing checks > drivers' device ID entries from the MODULE_DEVICE_TABLE against > interface and > device descriptors for the device. > > > =================== > Now , my question is, usb_device_ids are a member of static structure > which is defined in class specific driver. Yes. > This is private variable to that module. How can usbcore access that > array of devices without loading that particular module ? Magic :) > And my answer to this question is this is where modules.usbmap is used > and also when I connect USB device to my machine, some policy agents > reads modules.usbmap file and extracts information and must be calling > usbcore function. Then in turn usbcore will load/probe appropriate > device driver and NOT usbcore itself goes through list and decides about > which driver to load. No, it is userspace that does this determination, not the kernel itself. A combination of udev and modprobe does the work. It all happens with the module aliases, the modules.usbmap is depreciated and no one uses it anymore. You don't have to do anything except set up a MODULE_DEVICE_TABLE and then everything will "just work". Is this not happening for you? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html