From: "Adam Kropelin" <akropel1@rochester.rr.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Static naming for hiddev nodes
Date: Fri, 03 Aug 2007 00:44:09 +0000 [thread overview]
Message-ID: <024701c7d567$678b03e0$03c8a8c0@kroptech.com> (raw)
In-Reply-To: <01fe01c7d561$6a20b1a0$03c8a8c0@kroptech.com>
Kay Sievers wrote:
> On 8/3/07, Adam Kropelin <akropel1@rochester.rr.com> wrote:
>> I'm attempting to establish static naming for some hiddev devices
>> (UPSes) based on serial numbers. I used to be able to do this fairly
>> easily many moons ago in the early days of udev. Revisiting it on a
>> modern distro (RHEL5) I am unable to make it work. Here are the udev
>> rules I've tried and what happened with each....
>>
>> DRIVER="hiddev", SYSFS{serial}="JB0319039999", NAME="ups1"
>> - Does not match
>>
>> DRIVER="usbhid", SYSFS{serial}="JB0319039999", NAME="ups1"
>> - Does not match
>>
>> SYSFS{serial}="JB0319039999", NAME="ups1"
>> - Matches, but results in a device node for the usbdev not for
>> the hiddev
>>
>> BUS="usb", SYSFS{serial}="JB0319039999", NAME="ups1"
>> - Matches, but results in a device node for the usbdev not for
>> the hiddev
>>
>> SUBSYSTEM="usb", SYSFS{serial}="JB0319039999", NAME="ups1"
>> - Does not match
>>
>> I admit to being almost completely lost in the sysfs hierarchy. I'd
>> be happy to post a subtree if someone can suggest which one would be
>> helpful. It is worth noting that the default rules create correct and
>> working hiddev* nodes...I'm just trying to given them persistent
>> names.
>
> What is the "original" device node name, you expect and want to
> rename?
hiddev0
> What does:
> udevmonitor --env --kernel
> print when you connect the device?
My udevmonitor does not appear to support the --kernel option, but here
is output from --env:
UEVENT[1186101574.223153]
add@/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3
SUBSYSTEM=usb
SEQNUM(30
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb
UEVENT[1186101574.223808]
add@/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3/usbdev1.5_ep00
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3/usbdev1.5_ep00
SUBSYSTEM=usb_endpoint
SEQNUM(31
MAJORD2
MINOR=4
UEVENT[1186101574.224163]
add@/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3/1-2.3:1.0
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3/1-2.3:1.0
SUBSYSTEM=usb
SEQNUM(32
PHYSDEVBUS=usb
DEVICE=/proc/bus/usb/001/005
PRODUCTQd/2/106
TYPE=0/0/0
INTERFACE=3/0/0
MODALIAS=usb:v051Dp0002d0106dc00dsc00dp00ic03isc00ip00
UDEV [1186101574.230511]
add@/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3
UDEV_LOG=3
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3
SUBSYSTEM=usb
SEQNUM(30
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb
UDEVD_EVENT=1
UDEV [1186101574.262073]
add@/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3/usbdev1.5_ep00
UDEV_LOG=3
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3/usbdev1.5_ep00
SUBSYSTEM=usb_endpoint
SEQNUM(31
MAJORD2
MINOR=4
UDEVD_EVENT=1
DEVNAME=/dev/usbdev1.5_ep00
UDEV [1186101574.649249]
add@/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3/1-2.3:1.0
UDEV_LOG=3
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3/1-2.3:1.0
SUBSYSTEM=usb
SEQNUM(32
PHYSDEVBUS=usb
DEVICE=/proc/bus/usb/001/005
PRODUCTQd/2/106
TYPE=0/0/0
INTERFACE=3/0/0
MODALIAS=usb:v051Dp0002d0106dc00dsc00dp00ic03isc00ip00
UDEVD_EVENT=1
UEVENT[1186101575.338918] add@/class/usb/hiddev0
UDEV [1186101575.338918] add@/class/usb/hiddev0
UDEV_LOG=3
ACTIONd
DEVPATH=/class/usb/hiddev0
SUBSYSTEM=usb
SEQNUM(33
PHYSDEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3/1-2.3:1.0
PHYSDEVBUS=usb
PHYSDEVDRIVER=usbhid
MAJOR\x180
MINOR–
UDEVD_EVENT=1
DEVNAME=/dev/hiddev0
UEVENT[1186101575.340947]
add@/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3/1-2.3:1.0/usbdev1.5_ep81
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3/1-2.3:1.0/usbdev1.5_ep81
SUBSYSTEM=usb_endpoint
SEQNUM(34
MAJORD2
MINOR=4
UEVENT[1186101575.341275] add@/class/usb_device/usbdev1.5
ACTIONd
DEVPATH=/class/usb_device/usbdev1.5
SUBSYSTEM=usb_device
SEQNUM(35
PHYSDEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb
MAJOR\x189
MINOR=4
UDEV [1186101575.346565]
add@/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3/1-2.3:1.0/usbdev1.5_ep81
UDEV_LOG=3
ACTIONd
DEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3/1-2.3:1.0/usbdev1.5_ep81
SUBSYSTEM=usb_endpoint
SEQNUM(34
MAJORD2
MINOR=4
UDEVD_EVENT=1
DEVNAME=/dev/usbdev1.5_ep81
UDEV [1186101575.590750] add@/class/usb_device/usbdev1.5
UDEV_LOG=3
ACTIONd
DEVPATH=/class/usb_device/usbdev1.5
SUBSYSTEM=usb_device
SEQNUM(35
PHYSDEVPATH=/devices/pci0000:00/0000:00:07.2/usb1/1-2/1-2.3
PHYSDEVBUS=usb
PHYSDEVDRIVER=usb
MAJOR\x189
MINOR=4
UDEVD_EVENT=1
DEVNAME=/dev/bus/usb/001/005
--Adam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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
next prev parent reply other threads:[~2007-08-03 0:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-03 0:01 Static naming for hiddev nodes Adam Kropelin
2007-08-03 0:12 ` Kay Sievers
2007-08-03 0:44 ` Adam Kropelin [this message]
2007-08-03 0:59 ` Kay Sievers
2007-08-03 1:11 ` Adam Kropelin
2007-08-03 1:29 ` Kay Sievers
2007-08-03 12:12 ` Adam Kropelin
2007-08-03 14:10 ` Kay Sievers
2007-08-03 17:04 ` Adam Kropelin
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='024701c7d567$678b03e0$03c8a8c0@kroptech.com' \
--to=akropel1@rochester.rr.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).