linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Jellinghaus <aj@leogic.com>
To: linux-hotplug@vger.kernel.org
Subject: usb + sysfs + udev problems once more
Date: Wed, 27 Jun 2007 13:14:22 +0000	[thread overview]
Message-ID: <200706271514.22408.aj@leogic.com> (raw)

I thought to try the latest ubuntu beta version to see if
kernel + usb + sysfs + udev work as expected, but they don't.
the kernel is 2.6.22-rc, udev is 111-0ubuntu5. 

I'm posting here, as I guess this is not distribution specific.

the problem I see is this: when I plugin my usb smart card reader,
I see a number of events using "udevmonitor --kernel --environment".
of these I'm interested in these two:

UEVENT[1182947366.505829] add      /devices/pci0000:00/0000:00:1d.2/usb3/3-1 
(usb)
ACTION­d
DEVPATH=/devices/pci0000:00/0000:00:1d.2/usb3/3-1
SUBSYSTEM=usb
SEQNUM%49
MAJOR\x189
MINOR%8
DEVTYPE=usb_device
PHYSDEVBUS=usb
DEVICE=/proc/bus/usb/003/003
PRODUCTŽ6/3438/100
TYPE=0/0/0
BUSNUM\03
DEVNUM\03


and


UEVENT[1182947366.505908] 
add      /devices/pci0000:00/0000:00:1d.2/usb3/3-1/3-1:1.0 (usb)
ACTION­d
DEVPATH=/devices/pci0000:00/0000:00:1d.2/usb3/3-1/3-1:1.0
SUBSYSTEM=usb
SEQNUM%51
DEVTYPE=usb_interface
PHYSDEVBUS=usb
INTERFACE\x11/0/0
MODALIAS=usb:v08E6p3438d0100dc00dsc00dp00ic0Bisc00ip00


the first is nice, as it has the DEVICE info. I need that one.
however, only the second is matched by the udev rule:
SYSFS{bInterfaceClass}="0b", SYSFS{bInterfaceSubClass}="00", 
SYSFS{bInterfaceProtocol}="00" RUN+="/lib/udev/openct_usb"

so in the end my script is called only once, but without DEVICE.

how do I fix this?

or is this a kernel / sysfs problem that cannot be worked around?

and is there any chance udev will create events
for the /dev/bus/usb/ device files it creates?

thanks for your help.

Regards, Andreas

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

             reply	other threads:[~2007-06-27 13:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-27 13:14 Andreas Jellinghaus [this message]
2007-06-27 14:35 ` usb + sysfs + udev problems once more Kay Sievers
2007-06-27 15:27 ` Andreas Jellinghaus
2007-06-27 16:02 ` Alexander E. Patrakov
2007-06-27 16:22 ` Andreas Jellinghaus
2007-06-27 16:36 ` Kay Sievers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200706271514.22408.aj@leogic.com \
    --to=aj@leogic.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).