Hi there!

On Tue, 05 Feb 2008 22:31:00 +0100, Luca Capello wrote:
> On Sun, 20 Jan 2008 15:20:00 +0100, Ludovic Rousseau wrote:
>> Luca Capello a écrit :
>>> I finally found how to detect both events (insertion/removal):
>>>
>>>   
>>> MODALIAS=="pcmcia:m0157c0100f02fn00pfn00pa0981590FpbE9010D26pcDDC63BD8pd00000000",
>>>  \
>>>    RUN+="/usr/sbin/pcscd --hotplug"
>>
>> Great.
[...]
> However, by a test script [1] I also discovered that the MODALIAS rule
> is executed three times, as the udevmonitor output also revealed:

Actually, I've a bad news: this is something present from the beginning
of my tests, but which I've never discovered before.  Every time the
udev rules are processed, there's the following output:

  add_to_rules: unknown key 'MODALIAS' in /etc/udev/rules.d/z60_libccid.rules:6

This has the side effect that the 'RUN' program for the unknown
'MODALIAS' key is called for every udev event.  You can test it by
adding the MODALIAS rule and then call

  $ udevtest /sys/devices/system/cpu/cpu0/

This is a no-op, because while it causes the desired effect (pcscd's
configuration is "refreshed" at card insertion/removal), at the same
time it means too much pcscd reload for every minimal udev event.

>>> 3) an udev rules to detect PCMCIA card readers insertion/removal
>>>    would be nice.
>>
>> Sure. If your rule above works for any GemPC Card reader I will add
>> it.
>
> As explained above, the MODALIAS rule is surely an improvement, but
> I'd say that it's a workaround and not the solution.

Indeed, more investigation is needed.

Thx, bye,
Gismo / Luca



Reply via email to