18.4. Automatic Module Loading

If a device cannot be initialized with /sbin/hwup, the agent searches the module maps for a suitable driver. First, it searches the maps contained in /etc/hotplug/*.handmap. If it does not find the driver there, it also searches in /lib/modules/<kernelversion>/modules.*map. To use a driver other than the standard driver for the kernel, enter this in /etc/hotplug/*.handmap, because this is the first file read.

The USB agent also searches for user-mode drivers in the files /etc/hotplug/usb.usermap and /etc/hotplug/usb/*.usermap. User-mode drivers are programs that control access to a device instead of a kernel module. In this way, it is possible to call executable programs for particular devices.

In the case of PCI devices, pci.agent first queries hwinfo about driver modules. Only if hwinfo does not know of any drivers, the agent looks in pci.handmap and the kernel map. Because hwinfo has already looked there, the inquiry must fail. hwinfo has an additional database for driver mappings. However, it also loads pci.handmap to make sure that any individual mapping in this file is applied.

The agent pci.agent can be limited to devices of a certain type or driver modules from a certain subdirectory of /lib/modules/<kernelversion>/kernel/drivers. In the first case, the PCI device classes found at the end of the file /usr/share/pci.ids can be entered in the variables HOTPLUG_PCI_CLASSES_WHITELIST and HOTPLUG_PCI_CLASSES_BLACKLIST in the file /etc/sysconfig/hotplug. For the second case, specify one or several directories in the variables HOTPLUG_PCI_DRIVERTYPE_WHITELIST and HOTPLUG_PCI_DRIVERTYPE_BLACKLIST. Modules from the excluded directories are not loaded. In both cases, an empty whitelist implies that all possibilities except for those excluded in the blacklist are permitted. You can also exclude individual modules from loading. Just enter the modules that should never be loaded by an agent in the file /etc/hotplug/blacklist. Write every module name in a separate line.

If several suitable modules are found in a map file, only the first module is loaded. To load all modules, set the variable HOTPLUG_LOAD_MULTIPLE_MODULES=yes. However, it is better to create a separate device configuration /etc/sysconfig/hardware/hwcfg-* for this device.

Modules loaded with hwup are not affected by this. Automatic module loading only takes place in exceptional cases and will be further limited in future versions of SUSE LINUX. But if a suitable module was found, the agent creates a hwup configuration file, which will be used next time. This increases the speed of device initialization.


SUSE LINUX Administration Guide 9.3