On Sat 2007-09-15 05:40:44 -0400, Andreas Jellinghaus wrote: > 1.) which kernel are you running? 2.6.22 before 2.6.22.6 is buggy for example.
i'm running a stock debian kernel from lenny:
[0 [EMAIL PROTECTED] ~]$ uname -a
Linux squeak 2.6.21-2-686 #1 SMP Wed Jul 11 03:53:02 UTC 2007 i686 GNU/Linux
[0 [EMAIL PROTECTED] ~]$
> 2.) do you have usbfs at /proc/bus/usbfs or not?
no, there is nothing at /proc/bus/usbfs at all (or at /proc/bus/usb):
[0 [EMAIL PROTECTED] ~]$ ls -lad /proc/bus/usb*
dr-xr-xr-x 2 root root 0 2007-09-16 15:34 /proc/bus/usb
[0 [EMAIL PROTECTED] ~]$ ls -la /proc/bus/usb/
total 0
dr-xr-xr-x 2 root root 0 2007-09-16 16:26 .
dr-xr-xr-x 6 root root 0 2007-09-16 15:38 ..
[0 [EMAIL PROTECTED] ~]$
> 3.) if you run "/etc/init.d/openct restart" while the token is plugged in,
> will openct find it ("openct-tool list")? if so, it is a hotplug problem.
Yes, openct *will* find it if i run "/etc/init.d/openct restart" while
it is plugged in. While I didn't observe this misbehavior until i
upgraded my openct packages, i'm willing to believe that it's a
hotplug problem instead.
> if your kernel is fine and we agree it is a hotplug problem, them
> "udevmonitor --kernel --environment" might help as well as editing
> /lib/udev/openct_usb, adding
> ( date; echo $0: $*; export; set -x
> ...
> ) >> /root/openct_debug.log 2>&1
>
> and then plugging in a token, so we see what events the kernel emits
> and if udev calls openct and what happends in the openct script.
here you go (i killed udevmonitor with ^C after the insertion was
complete:
[0 [EMAIL PROTECTED] ~]# udevmonitor --kernel --environment
udevmonitor will print the received events for:
UEVENT the kernel uevent
UEVENT[1189971848.835197] add /devices/pci0000:00/0000:00:1d.1/usb2/2-1
(usb)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1
SUBSYSTEM=usb
SEQNUM=1766
PHYSDEVBUS=usb
DEVICE=/proc/bus/usb/002/004
PRODUCT=973/1/100
TYPE=255/0/0
UEVENT[1189971848.836380] add /class/usb_endpoint/usbdev2.4_ep00
(usb_endpoint)
ACTION=add
DEVPATH=/class/usb_endpoint/usbdev2.4_ep00
SUBSYSTEM=usb_endpoint
SEQNUM=1767
MAJOR=254
MINOR=6
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb
UEVENT[1189971848.836444] add
/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0 (usb)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0
SUBSYSTEM=usb
SEQNUM=1768
PHYSDEVBUS=usb
DEVICE=/proc/bus/usb/002/004
PRODUCT=973/1/100
TYPE=255/0/0
INTERFACE=0/0/0
MODALIAS=usb:v0973p0001d0100dcFFdsc00dp00ic00isc00ip00
UEVENT[1189971848.836505] add /class/usb_device/usbdev2.4 (usb_device)
ACTION=add
DEVPATH=/class/usb_device/usbdev2.4
SUBSYSTEM=usb_device
SEQNUM=1769
MAJOR=189
MINOR=131
PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb
[0 [EMAIL PROTECTED] ~]# cat /root/openct_debug.log
Sun Sep 16 15:44:08 EDT 2007
/lib/udev/openct_usb:
export ACTION="add"
export DEVICE="/proc/bus/usb/002/004"
export DEVPATH="/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0"
export INTERFACE="0/0/0"
export MODALIAS="usb:v0973p0001d0100dcFFdsc00dp00ic00isc00ip00"
export OLDPWD
export PHYSDEVBUS="usb"
export PRODUCT="973/1/100"
export PWD="/"
export SEQNUM="1768"
export SHLVL="1"
export SUBSYSTEM="usb"
export TYPE="255/0/0"
export UDEVD_EVENT="1"
export UDEV_LOG="3"
+ '[' -n /devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0 ']'
+ '[' add = add ']'
+ '[' -e /var/run/openct/status ']'
+ '[' -z '' ']'
+++ dirname /devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.0
++ udevinfo --query=name --path=/devices/pci0000:00/0000:00:1d.1/usb2/2-1
no record for '/devices/pci0000:00/0000:00:1d.1/usb2/2-1' in database
+ DEVNAME=/dev/
+ '[' -n /dev/ -a -e /dev/ ']'
+ DEVICE=/dev/
+ '[' -n /dev/ ']'
+ '[' -z 973/1/100 -a -n usb:v0973p0001d0100dcFFdsc00dp00ic00isc00ip00 ']'
+ '[' -z 973/1/100 ']'
+ '[' -n 973/1/100 ']'
+ for A in '"0 1 2 3 4 5 6 7 8 9"'
+ '[' -e /dev/ ']'
+ /usr/sbin/openct-control attach usb:973/1/100 usb /dev/
+ exit 0
[0 [EMAIL PROTECTED] ~]#
interesting that it does refer to the /proc/bus/usb
> also it is important to specify if your kernel is compiled with usb
> device class support or not. 0.6.14 should now work in both cases,
> but knowing what kernel we have is still good.
What kernel config options are you looking for in particular? The
stock debian kernel has just about everything enabled, but
modularized.
> also 0.6.14 should work without /proc/bus/usbfs, but testing with
> and without could help track down a possible bug.
I experienced the same failure with /proc/bus/usb mounted, i'm
afraid. For now, I've commented out the section in
/etc/init.d/mountkernfs.sh which mounts the usbfs, as per our discussion in
debian bug 337317
[0], but i'm happy to try things different ways, if you prefer.
Thanks for your help in sorting this out. Please let me know what
else i can do.
Regards,
--dkg
[0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=337317
pgpAjGcKWwIAv.pgp
Description: PGP signature

