Commit Graph

7 Commits

Author SHA1 Message Date
Dmitry Torokhov 9b32afa9f2 rules: load drivers only on "add" events
Previously we were loading kernel modules on all device events save
for "remove". With the introduction of KOBJ_BIND/KOBJ_UNBIND this causes
issues, as driver modules that have devices bound to their drivers get
immediately reloaded, and it appears to the user that module unloading
does not work.

Let's change the rules to only load modules on "add" events instead.
2017-09-11 21:04:34 +02:00
Kay Sievers b11d8d1993 rules: drivers - do not reset RUN list 2014-01-03 01:32:03 +01:00
Kay Sievers bf7f800f2b rules: drivers - always call kmod, even when a driver is bound to the device
On Sat, Jul 20, 2013 at 12:56 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> After a recent change present in 3.11-rc1 there is a driver, called processor,
> that can be bound to the CPU devices whose sysfs directories are located under
> /sys/devices/system/cpu/.  A side effect of this is that, after the driver has
> been bound to those devices, the kernel adds DRIVER=processor to ENV for CPU
> uevents and they don't match the default rule for autoloading modules matching
> MODALIAS:
>
> DRIVER!="?*", ENV{MODALIAS}=="?*", IMPORT{builtin}="kmod load $env{MODALIAS}"
>
> any more.  However, there are some modules whose module aliases match specific
> CPU features through the modalias string and those modules should be loaded
> automatically if a compatible CPU is present.  Yet, with the processor driver
> bound to the CPU devices the above rule is not sufficient for that, so we need
> a new default udev rule allowing those modules to be autoloaded even if the
> CPU devices have drivers.
2013-07-20 14:31:53 +02:00
Tom Gundersen f4fbb8be14 udev: builtin - use RUN rather than IMPORT for loading modules
The 'kmod' builtin, like the 'firmware' and 'uaccess' builtins, does not set
any variables, so don't use IMPORT.

Notice that this changes the behaviour slightly: the processing of subsequent
rules for the event that loads a module will no longer wait for the module
loading to finish. This is not expected to cause any problems, but we should
keep an eye on it.
2013-03-18 18:28:59 +01:00
Tom Gundersen e30431623a build-sys: make loadable module support optional
kmod is unecessary if loadable module support is disabled in the kernel,
so make the dependency optional.
2012-11-20 19:35:27 +01:00
Kay Sievers 83cd6b754b udev: convert 'uaccess' to a builtin 2012-04-09 19:25:41 +02:00
Kay Sievers 3e2147858f move imported udev into place 2012-04-04 05:05:07 +02:00
Renamed from src/udev/rules/80-drivers.rules (Browse further)