Fix for smart card startup races

The rules mentioned in my last post to avoid race conditions by handling the entire setup of USB smart card readers within udev and /dev:


SUBSYSTEM=="usb_device", SYSFS{idVendor}=="04e6", SYSFS{idProduct}=="e003", GROUP="scard", MODE="0664"
SUBSYSTEM=="usb_device", SYSFS{bDeviceClass}=="0x0B", GROUP="scard", MODE="0664"
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="04e6", SYSFS{idProduct}=="5115", GROUP="scard", MODE="0664"

This requires 2.6.14 and an udev that was current for that kernel. With more recent udev versions one should use ATTRS instead of SYSFS:

SUBSYSTEM=="usb_device", ATTRS{idVendor}=="04e6", ATTRS{idProduct}=="e003", GROUP="scard", MODE="0664"
SUBSYSTEM=="usb_device", ATTRS{bDeviceClass}=="0x0B", GROUP="scard", MODE="0664"
SUBSYSTEM=="usb_device", ATTRS{idVendor}=="04e6", ATTRS{idProduct}=="5115", GROUP="scard", MODE="0664"

Leave a Reply