Skip to contentSkip to conversation

cm4000 device creation

DISCUSSION Joachim Breitner 2 participants 6 messages Jan 29, 2006

lore
Share & tools
lore
#0 lore raw

Hi list,

since the change from pcmcia-cs to pcmciautils (I think at least), the device /dev/cmm0 for my smartcard reader (Cardman 4000) is not created anymore. I don't know enough about the internals of udev et. al to pinpoint the problem, so I provide you with a lot of logs :-)

Without the cm4000_cs modules loaded (debian unstable 2.6.15 kernel), I run pccardctl insert.

Here is the udevmonitor output:
UEVENT[1138536089.027066] add@/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0.0 UDEV [1138536089.072472] add@/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0.0 UEVENT[1138536089.102026] add@/module/cm4000_cs UEVENT[1138536089.102627] add@/bus/pcmcia/drivers/cm4000_cs
UDEV [1138536089.152476] add@/module/cm4000_cs
UDEV [1138536089.154665] add@/bus/pcmcia/drivers/cm4000_cs

And there the syslog output, with udevcontrol log_priorityÞbug:

Jan 29 13:01:29 otto kernel: pccard: PCMCIA card inserted into slot 0
Jan 29 13:01:29 otto kernel: pcmcia: registering new device pcmcia0.0
Jan 29 13:01:29 otto udevd[7160]: udev_event_run: seq 1818 forked, pid [7694], 'add' 'pcmcia', 0 seconds old
Jan 29 13:01:29 otto udevd-event[7694]: wait_for_sysfs: file '/sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0.0/bus' appeared after 0 loops
Jan 29 13:01:29 otto udevd-event[7694]: run_program: '/lib/udev/pcmcia-check-broken-cis'
Jan 29 13:01:29 otto udevd-event[7694]: run_program: '/lib/udev/pcmcia-check-broken-cis' returned with status 0
Jan 29 13:01:29 otto udevd-event[7694]: run_program: '/bin/sh -c 'echo 1 > /sys//devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0.0/allow_func_id_match''
Jan 29 13:01:29 otto udevd-event[7694]: run_program: '/bin/sh' returned with status 0
Jan 29 13:01:29 otto udevd-event[7694]: pass_env_to_socket: passed 299 bytes to socket '/org/kernel/udev/monitor',
Jan 29 13:01:29 otto udevd-event[7694]: run_program: '/sbin/modprobe pcmcia:m0223c0002f00fn00pfn00pa2FB368CApbA2BD8C39pc00000000pd00000000'
Jan 29 13:01:29 otto udevd[7160]: udev_event_run: seq 1819 forked, pid [7701], 'add' 'module', 0 seconds old
Jan 29 13:01:29 otto kernel: cm4000_cs.c v2.4.0gm5 - All bugs added by Harald Welte
Jan 29 13:01:29 otto udevd[7160]: udev_event_run: seq 1820 forked, pid [7702], 'add' 'drivers', 0 seconds old
Jan 29 13:01:29 otto udevd-event[7694]: run_program: '/sbin/modprobe' returned with status 0
Jan 29 13:01:29 otto udevd-event[7694]: run_program: 'udev_run_hotplugd pcmcia'
Jan 29 13:01:29 otto udevd-event[7694]: run_program: '/lib/udev/udev_run_hotplugd' returned with status 0
Jan 29 13:01:29 otto udevd-event[7694]: run_program: 'udev_run_devd pcmcia'
Jan 29 13:01:29 otto udevd-event[7694]: run_program: '/lib/udev/udev_run_devd' returned with status 0
Jan 29 13:01:29 otto udevd-event[7694]: udev_event_run: seq 1818 finished
Jan 29 13:01:29 otto udevd[7160]: udev_done: seq 1818, pid [7694] exit with 0, 0 seconds old
Jan 29 13:01:29 otto udevd-event[7701]: pass_env_to_socket: passed 113 bytes to socket '/org/kernel/udev/monitor',
Jan 29 13:01:29 otto udevd-event[7701]: udev_event_run: seq 1819 finished
Jan 29 13:01:29 otto udevd[7160]: udev_done: seq 1819, pid [7701] exit with 0, 0 seconds old
Jan 29 13:01:29 otto udevd-event[7702]: pass_env_to_socket: passed 138 bytes to socket '/org/kernel/udev/monitor',
Jan 29 13:01:29 otto udevd-event[7702]: udev_event_run: seq 1820 finished
Jan 29 13:01:29 otto udevd[7160]: udev_done: seq 1820, pid [7702] exit with 0, 0 seconds old

Any ideas, or any more information you need?

Please CC: me on replies, I'm not subscribed to the list.

Thanks,
Joachim

Signature · 18 lines
Joachim "nomeata" Breitner
  mail: [email protected] | ICQ# 74513189 | GPG-Key: 4743206C
  JID: [email protected] | http://www.joachim-breitner.de/
  Debian Developer: [email protected]
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 10 lines · Joachim Breitner

Hi list,

since the change from pcmcia-cs to pcmciautils (I think at least), the device /dev/cmm0 for my smartcard reader (Cardman 4000) is not created anymore. I don't know enough about the internals of udev et. al to pinpoint the problem, so I provide you with a lot of logs :-)

Without the cm4000_cs modules loaded (debian unstable 2.6.15 kernel), I run pccardctl insert.

have you updated kernel at the same time? It appears cm4000_cs does not use any class function and in 2.6.15 it won't appear in sysfs without them. It has to be fixed in kernel.

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD3Lv+R6LMutpd94wRAsDiAJ0SaP47pxrJEO9A6StULuY5UpAvpgCferK2 LyXJVU2qGW2pYRPil9nc6sU=HH+k
-----END PGP SIGNATURE-----

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#2 lore raw
In reply to Joachim Breitner

Hi,

Am Sonntag, den 29.01.2006, 15:58 +0300 schrieb Andrey Borzenkov:

Quoted 1 line

have you updated kernel at the same time?

Actually, I have, from 2.4.14 to 1.4.15

Quoted 3 lines

It appears cm4000_cs does not use
any class function and in 2.6.15 it won't appear in sysfs without them. It has to be fixed in kernel.

Thanks for the hint. What would you recommend as an intermediate solution. A udev rule for the card reader with "RUN mknod ... /dev/cmm0"?

Thanks,
Joachim

Signature · 18 lines
Joachim "nomeata" Breitner
  mail: [email protected] | ICQ# 74513189 | GPG-Key: 4743206C
  JID: [email protected] | http://www.joachim-breitner.de/
  Debian Developer: [email protected]
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#3 lore raw
In reply to Joachim Breitner

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 7 lines · Joachim Breitner

Hi,

Am Sonntag, den 29.01.2006, 15:58 +0300 schrieb Andrey Borzenkov:

Quoted 1 line

have you updated kernel at the same time?

Actually, I have, from 2.4.14 to 1.4.15

Quoted 8 lines
Quoted 3 lines

It appears cm4000_cs does not use
any class function and in 2.6.15 it won't appear in sysfs without them. It has to be fixed in kernel.

Thanks for the hint. What would you recommend as an intermediate solution. A udev rule for the card reader with "RUN mknod ... /dev/cmm0"?

well, you have to know major allocated by kernel and it is hard without node appearing in sysfs (cm4000_cs does not request any specific major). -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD3MFXR6LMutpd94wRAiLdAKCANCgcdX/9Yjo+USpb7hox2vHNJQCfZe5H JquJKY8jeNu9S1NqbBP5b/8�Sd
-----END PGP SIGNATURE-----

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#4 lore raw
In reply to Joachim Breitner

Hi,

Am Sonntag, den 29.01.2006, 16:21 +0300 schrieb Andrey Borzenkov:

Quoted 6 lines
Quoted 3 lines

Thanks for the hint. What would you recommend as an intermediate solution. A udev rule for the card reader with "RUN mknod ... /dev/cmm0"?

well, you have to know major allocated by kernel and it is hard without node appearing in sysfs (cm4000_cs does not request any specific major).

Thanks, I'll contact the drivers original author that his driver is currently unusable.

Greetings,
Joachim

Signature · 15 lines
Joachim Breitner
  e-Mail: [email protected]
  Homepage: http://www.joachim-breitner.de
  ICQ#: 74513189


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#5 lore raw
In reply to Joachim Breitner

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 10 lines · Joachim Breitner

Hi,

Am Sonntag, den 29.01.2006, 16:21 +0300 schrieb Andrey Borzenkov:

Quoted 6 lines
Quoted 3 lines

Thanks for the hint. What would you recommend as an intermediate solution. A udev rule for the card reader with "RUN mknod ... /dev/cmm0"?

well, you have to know major allocated by kernel and it is hard without node appearing in sysfs (cm4000_cs does not request any specific major).

actually it is hard to get minor. For major you can use /proc/devices:

major=$(awk '$2 = "cmm" {print $1}' /proc/devices) mknod /dev/cmm0 c $major 0

you do not even need udev rule for that, it can be run as postinstall from modprobe.

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD3OOFR6LMutpd94wRAinIAJwN0xe2wKw0st+50u2GBJky/JSU6QCeIhEF YKbO5F4GEGdesqJGJVzS8ks=Bx1A
-----END PGP SIGNATURE-----

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel