Hi Ludovic!

On Wed, 09 Jan 2008 08:38:52 +0100, Ludovic Rousseau wrote:
> Le mercredi 09 janvier 2008 à 00:01 +0100, Luca Capello a écrit :
>> I've a IBM/Lenovo ThinkPad X60s, which has only one PCMCIA slot.  My
>> Gemplus GemPC card reader works flawlessy with libccid/pcscd, but as
>> soon as the card is removed, /var/log/syslog is flooded:
>
> You removed the smart card or the PCMCIA card?
> I guess it is the PCMCIA card rearding the error messages.

I removed the PCMCIA card reader, yes.

> The PCMCIA reader is not really hotplug and play on Linux.

I discovered that performing the tests described below :-(

> The udev rule to detect the reader insertion
> in /etc/udev/rules.d/z60_libccid.rules is commented out for example.

  SUBSYSTEMS=="pcmcia", DRIVERS=="serial_cs", ACTION=="add", \
   ATTRS{prod_id1}=="Gemplus", ATTRS{prod_id2}=="SerialPort", \
   ATTRS{prod_id3}=="GemPC Card", RUN+="/usr/sbin/pcscd --hotplug"

This rule only work when inserting the PCMCIA reader, even if I change
ACTION=="remove" or I completely delete ACTION (the rule should be then
always effective).

BTW, mimicking the rules for USB readers, the rule above can simply be:

  SUBSYSTEMS=="pcmcia", ATTRS{manf_id}=="0x0157", \
   ATTRS{card_id}=="0x0100", RUN+="/usr/sbin/pcscd --hotplug"

Since this rule still detects insertion only, I guess the PCMCIA stack
is not completely udev compatible.

I finally found how to detect both events (insertion/removal):

  
MODALIAS=="pcmcia:m0157c0100f02fn00pfn00pa0981590FpbE9010D26pcDDC63BD8pd00000000",
 \
   RUN+="/usr/sbin/pcscd --hotplug"

>> Is it possible to reduce this number?  Even with --critical (which
>> option BTW cannot be easily set) the ccid_serial.c error line is still
>> printed.
>
> The problem is not to reduce the number of messages displayed but tell
> pcscd that the reader is no more there.

I think this bug is the sum of three different bugs:

1) pcscd init scripts can set the debug level (option $DAEMON_ARGS), but
   there's no easy way to do it (e.g. in /etc/default/pcscd).

2) libccid ships udev rules that depend on pcscd, which is only
   recommended by libccid.  I'd suggest to ship these rules in pcscd,
   instead, since the latter depends on libccid anyway.

3) an udev rules to detect PCMCIA card readers insertion/removal would
   be nice.

If no one replies in one week, going to clone, retitle and reassign the
bugs accordingly to what explained above.

Thx, bye,
Gismo / Luca

Footnotes: 
[1] http://luca.pca.it/projects/ibm/x60_1706-gmg/

Attachment: pgpNRpkZ8Xwjz.pgp
Description: PGP signature

Reply via email to