be52b9f
From 59eb9113f522703d80f2904c81825e4a165bb050 Mon Sep 17 00:00:00 2001
be52b9f
From: Kay Sievers <kay@vrfy.org>
be52b9f
Date: Sat, 20 Jul 2013 14:29:12 +0200
51b11df
Subject: [PATCH] rules: drivers - always call kmod, even when a driver is
51b11df
 bound to the device
be52b9f
be52b9f
On Sat, Jul 20, 2013 at 12:56 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
be52b9f
> After a recent change present in 3.11-rc1 there is a driver, called processor,
be52b9f
> that can be bound to the CPU devices whose sysfs directories are located under
be52b9f
> /sys/devices/system/cpu/.  A side effect of this is that, after the driver has
be52b9f
> been bound to those devices, the kernel adds DRIVER=processor to ENV for CPU
be52b9f
> uevents and they don't match the default rule for autoloading modules matching
be52b9f
> MODALIAS:
be52b9f
>
be52b9f
> DRIVER!="?*", ENV{MODALIAS}=="?*", IMPORT{builtin}="kmod load $env{MODALIAS}"
be52b9f
>
be52b9f
> any more.  However, there are some modules whose module aliases match specific
be52b9f
> CPU features through the modalias string and those modules should be loaded
be52b9f
> automatically if a compatible CPU is present.  Yet, with the processor driver
be52b9f
> bound to the CPU devices the above rule is not sufficient for that, so we need
be52b9f
> a new default udev rule allowing those modules to be autoloaded even if the
be52b9f
> CPU devices have drivers.
be52b9f
---
be52b9f
 rules/80-drivers.rules | 2 +-
be52b9f
 1 file changed, 1 insertion(+), 1 deletion(-)
be52b9f
be52b9f
diff --git a/rules/80-drivers.rules b/rules/80-drivers.rules
674ca7d
index 50523e4333..0b22d73ce5 100644
be52b9f
--- a/rules/80-drivers.rules
be52b9f
+++ b/rules/80-drivers.rules
be52b9f
@@ -2,7 +2,7 @@
be52b9f
 
be52b9f
 ACTION=="remove", GOTO="drivers_end"
be52b9f
 
be52b9f
-DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{builtin}="kmod load $env{MODALIAS}"
be52b9f
+ENV{MODALIAS}=="?*", RUN{builtin}="kmod load $env{MODALIAS}"
be52b9f
 SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}="kmod load tifm_sd"
be52b9f
 SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN{builtin}="kmod load tifm_ms"
be52b9f
 SUBSYSTEM=="memstick", RUN{builtin}="kmod load ms_block mspro_block"