multiple mechanism: Modprobe uses a "Makefile"-like dependency file, created by depmod, to automatically load the relevant module(s) from the set of modules available in predefined directory trees. (look inside the file /lib/modules/`uname -r`/modules.dep) and using udev: http://wiki.archlinux.org/index.php/Udev (read autoloading) inside the kernel, there is a special function "request_module" which is used by the kernel functions to load other necessary kernel modules. and quoting from the function: * If module auto-loading support is disabled then this function * becomes a no-operation. */ int __request_module(bool wait, const char *fmt, ...) { On Sat, Jan 23, 2010 at 7:04 PM, Joel Fernandes <agnel.joel@xxxxxxxxx> wrote: > I have a doubt with the modalias file in sysfs and its role in > modprobe's ability to automatically load modules. > > I understand that this file is generated by the kernel based on the > list of devices that the driver tells the kernel it supports? > and it is with this list that modprobe figures which module to load > for which device. > > But how does the module tell the kernel about the list of devices it > supports, if it hasn't been loaded yet (and which is what we were > trying to load in the first place)? > > Thanks, > -Joel > > -- > To unsubscribe from this list: send an email with > "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx > Please read the FAQ at http://kernelnewbies.org/FAQ > > -- Regards, Peter Teoh -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ