* [PATCH] rules: avoid reading DRIVER for devices without modalias
@ 2009-06-03 14:51 Alan Jenkins
2009-06-03 19:54 ` Kay Sievers
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Alan Jenkins @ 2009-06-03 14:51 UTC (permalink / raw)
To: linux-hotplug
DRIVER requires a readlink() in sysfs. The MODALIAS key is provided by
uevent and requires no additional read. Test MODALIAS first.
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
diff --git a/rules/rules.d/80-drivers.rules b/rules/rules.d/80-drivers.rules
index 7e13e80..2b68ddc 100644
--- a/rules/rules.d/80-drivers.rules
+++ b/rules/rules.d/80-drivers.rules
@@ -2,7 +2,7 @@
ACTION!="add", GOTO="drivers_end"
-DRIVER!="?*", ENV{MODALIAS}="?*", RUN{ignore_error}+="/sbin/modprobe -b $env{MODALIAS}"
+ENV{MODALIAS}="?*", DRIVER!="?*", RUN{ignore_error}+="/sbin/modprobe -b $env{MODALIAS}"
SUBSYSTEM="tifm", ENV{TIFM_CARD_TYPE}="SD", RUN+="/sbin/modprobe -b tifm_sd"
SUBSYSTEM="tifm", ENV{TIFM_CARD_TYPE}="MS", RUN+="/sbin/modprobe -b tifm_ms"
SUBSYSTEM="memstick", RUN+="/sbin/modprobe -b --all ms_block mspro_block"
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] rules: avoid reading DRIVER for devices without modalias
2009-06-03 14:51 [PATCH] rules: avoid reading DRIVER for devices without modalias Alan Jenkins
@ 2009-06-03 19:54 ` Kay Sievers
2009-06-03 20:10 ` Alan Jenkins
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Kay Sievers @ 2009-06-03 19:54 UTC (permalink / raw)
To: linux-hotplug
On Wed, Jun 3, 2009 at 16:51, Alan Jenkins <alan-jenkins@tuffmail.co.uk> wrote:
> DRIVER requires a readlink() in sysfs. The MODALIAS key is provided by
> uevent and requires no additional read. Test MODALIAS first.
Are you sure that makes a difference? We *should* sort the keys while
parsing, and run the cheaper ones before the more expensive ones. At
least that's how it was before the rewrite of the parser, and it
*should* be still the same today.
Thanks,
Kay
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rules: avoid reading DRIVER for devices without modalias
2009-06-03 14:51 [PATCH] rules: avoid reading DRIVER for devices without modalias Alan Jenkins
2009-06-03 19:54 ` Kay Sievers
@ 2009-06-03 20:10 ` Alan Jenkins
2009-08-15 23:32 ` [PATCH] rules: avoid reading DRIVER for devices without Marco d'Itri
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Alan Jenkins @ 2009-06-03 20:10 UTC (permalink / raw)
To: linux-hotplug
Kay Sievers wrote:
> On Wed, Jun 3, 2009 at 16:51, Alan Jenkins <alan-jenkins@tuffmail.co.uk> wrote:
>
>> DRIVER requires a readlink() in sysfs. The MODALIAS key is provided by
>> uevent and requires no additional read. Test MODALIAS first.
>>
>
> Are you sure that makes a difference? We *should* sort the keys while
> parsing, and run the cheaper ones before the more expensive ones. At
> least that's how it was before the rewrite of the parser, and it
> *should* be still the same today.
>
> Thanks,
> Kay
>
Sorry, I'd forgotten that. You're right it makes no difference.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rules: avoid reading DRIVER for devices without
2009-06-03 14:51 [PATCH] rules: avoid reading DRIVER for devices without modalias Alan Jenkins
2009-06-03 19:54 ` Kay Sievers
2009-06-03 20:10 ` Alan Jenkins
@ 2009-08-15 23:32 ` Marco d'Itri
2009-08-16 8:46 ` [PATCH] rules: avoid reading DRIVER for devices without modalias Alan Jenkins
2009-08-16 10:51 ` [PATCH] rules: avoid reading DRIVER for devices without Marco d'Itri
4 siblings, 0 replies; 6+ messages in thread
From: Marco d'Itri @ 2009-08-15 23:32 UTC (permalink / raw)
To: linux-hotplug
On Jun 03, Alan Jenkins <alan-jenkins@tuffmail.co.uk> wrote:
> DRIVER requires a readlink() in sysfs. The MODALIAS key is provided by
> uevent and requires no additional read. Test MODALIAS first.
What is the point of checking both DRIVER and ENV{MODALIAS}?
The Debian rules files always checked only ENV{MODALIAS}.
--
ciao,
Marco
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rules: avoid reading DRIVER for devices without modalias
2009-06-03 14:51 [PATCH] rules: avoid reading DRIVER for devices without modalias Alan Jenkins
` (2 preceding siblings ...)
2009-08-15 23:32 ` [PATCH] rules: avoid reading DRIVER for devices without Marco d'Itri
@ 2009-08-16 8:46 ` Alan Jenkins
2009-08-16 10:51 ` [PATCH] rules: avoid reading DRIVER for devices without Marco d'Itri
4 siblings, 0 replies; 6+ messages in thread
From: Alan Jenkins @ 2009-08-16 8:46 UTC (permalink / raw)
To: linux-hotplug
Marco d'Itri wrote:
> On Jun 03, Alan Jenkins <alan-jenkins@tuffmail.co.uk> wrote:
>
>
>> DRIVER requires a readlink() in sysfs. The MODALIAS key is provided by
>> uevent and requires no additional read. Test MODALIAS first.
>>
> What is the point of checking both DRIVER and ENV{MODALIAS}?
> The Debian rules files always checked only ENV{MODALIAS}.
>
I think the idea is to avoid calling modprobe if the driver was built
into the kernel (or the module is already loaded).
Alan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rules: avoid reading DRIVER for devices without
2009-06-03 14:51 [PATCH] rules: avoid reading DRIVER for devices without modalias Alan Jenkins
` (3 preceding siblings ...)
2009-08-16 8:46 ` [PATCH] rules: avoid reading DRIVER for devices without modalias Alan Jenkins
@ 2009-08-16 10:51 ` Marco d'Itri
4 siblings, 0 replies; 6+ messages in thread
From: Marco d'Itri @ 2009-08-16 10:51 UTC (permalink / raw)
To: linux-hotplug
On Aug 16, Alan Jenkins <alan-jenkins@tuffmail.co.uk> wrote:
>> What is the point of checking both DRIVER and ENV{MODALIAS}?
>> The Debian rules files always checked only ENV{MODALIAS}.
Nevermind, this is not true...
--
ciao,
Marco
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-08-16 10:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-03 14:51 [PATCH] rules: avoid reading DRIVER for devices without modalias Alan Jenkins
2009-06-03 19:54 ` Kay Sievers
2009-06-03 20:10 ` Alan Jenkins
2009-08-15 23:32 ` [PATCH] rules: avoid reading DRIVER for devices without Marco d'Itri
2009-08-16 8:46 ` [PATCH] rules: avoid reading DRIVER for devices without modalias Alan Jenkins
2009-08-16 10:51 ` [PATCH] rules: avoid reading DRIVER for devices without Marco d'Itri
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.