udev: rules using multiple sysfs directories
Hi
I'm new to this list so excuse me if this is a daft question but I've trawled the archives to no avail.
I've got an example on my machine where it would be really useful if udev could look at sysfs params on multiple directory levels (see below). I know from the docs that it can't do this. As a relative udev newbie, could someone let me know why this is so ?
Many thanks,
James.
Example
-------
This seems to me to be a limitation in the following example: I often use a PS2 to USB keyboard/mouse adapter with my laptop so I can use an external keyboard and monitor. I want to generate a persistent name (so I can use a different keymap under X because it's different layout from the laptop's built-in keyboard). So, for the udev rule I need to identify it by SYSFS{product} or SYSFS{serial} or whatever. However, because the device contains two interfaces (keyboard and mouse), there are sub directories at this level in sysfs. So I need to be able to look at bInterfaceProtocol in those lower level directories as well, to tell if it's the keyboard or the mouse.
Ok, I could write a shell script, or just be sensible and admit that it's unlikely I'd ever get two USB keyboards connected to one machine and use bInterfaceClass and bInterfaceProtocol together.
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
I've got another example -- the AirPrime 5220 1xEVDO wireless modem for which Greg K-H just whipped out a driver. (Thanks Greg!)
This is a composite device with two serial ports:
Bus 004 Device 004: ID 0f3d:0112
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 16
idVendor 0x0f3d
idProduct 0x0112
bcdDevice 0.01
iManufacturer 1 AirPrime, Incorporated
iProduct 2 AirPrime CDMA Wireless PC Card
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 62
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 4 Data Interface
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type none
Usage Type Data
wMaxPacketSize 0x0010 bytes 16 once
bInterval 128
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x8a EP 10 IN
bmAttributes 2
Transfer Type Bulk
Synch Type none
Usage Type Data
wMaxPacketSize 0x0040 bytes 64 once
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x0b EP 11 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type none
Usage Type Data
wMaxPacketSize 0x0040 bytes 64 once
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 4 Data Interface
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type none
Usage Type Data
wMaxPacketSize 0x0040 bytes 64 once
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type none
Usage Type Data
wMaxPacketSize 0x0040 bytes 64 once
bInterval 0
Language IDs: (length=4)
0409 English(US)The first port (bInterfaceNumber 0) is the CDMA modem port; the second port (bInterfaceNumber 1) is the "control port" which is used for diagnostic information, etc. I would like to create persistent names for these two ports (/dev/cdma_modem and /dev/cdma_ctl or something similar). Since idVendor and idProduct are a directory above bInterfaceNumber, there doesn't appear to be any way to do this.
This seems like a significant limitation for USB composite devices.
Signature · 15 lines
==================================== Ian Pilcher [email protected] ==================================== ------------------------------------------------------- SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 4 lines · James Macfarlane
I've got an example on my machine where it would be really useful if udev could look at sysfs params on multiple directory levels (see below). I know from the docs that it can't do this. As a relative udev newbie, could someone let me know why this is so ?
How does:
tree /sys/...
of this device look like?
What does:
udevinfo -a -p /sys/xxx...
print for this device?
I never tried this, but:
SYSFS{product/value}
may work to go into subdirs?
Kay
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 7 lines · Kay Sievers
How does:
tree/sys/...
of this device look like?What does:
udevinfo -a -p/sys/xxx...
print for this device?
See at the bottom of this message.
Quoted 3 lines
I never tried this, but:
SYSFS{product/value}
may work to go into subdirs?
Not sure exactly you mean, in terms of syntax. I've just tried SYSFS{1.0/bInterfaceProtocol} but it didn't seem to work.
udevinfo says: "Only attributes within one device section may be used together in one rule, to match the device for which the node will be created." - that seems to indicate it won't work.
I've had a brief delve into the source and it looks unlikely to work either. It appears to search for attribute names in a pre-existing list, and everything between the curly braces counts as the attribute name (btw, I'm looking at ver 056, which is what my distro (debian testing) uses). So adding '/' is probably not going to work.
It walks the tree and breaks out of the loop once all the key-value pairs are matched, but it does all the SYSFS pairs in one loop. So unless all the SYSFS attributes are matched at one level, then the whole rule fails to match.
Cheers,
James.
Trees
-----
/sys/class/input/
[...]
|-- event2 | |-- dev | |-- device -> ../../../devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.2/2-1.2:1.0 | `-- driver -> ../../../bus/usb/drivers/usbhid |-- event3 | |-- dev | |-- device
-> ../../../devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.2/2-1.2:1.1
| `-- driver -> ../../../bus/usb/drivers/usbhid
and:
/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.2/
|-- 2-1.2:1.0 | |-- bAlternateSetting | |-- bInterfaceClass | |-- bInterfaceNumber | |-- bInterfaceProtocol | |-- bInterfaceSubClass | |-- bNumEndpoints | |-- detach_state | |-- driver -> ../../../../../../../bus/usb/drivers/usbhid | `-- power | `-- state |-- 2-1.2:1.1 | |-- bAlternateSetting | |-- bInterfaceClass | |-- bInterfaceNumber | |-- bInterfaceProtocol | |-- bInterfaceSubClass | |-- bNumEndpoints | |-- detach_state | |-- driver -> ../../../../../../../bus/usb/drivers/usbhid | `-- power | `-- state |-- bConfigurationValue |-- bDeviceClass |-- bDeviceProtocol |-- bDeviceSubClass |-- bMaxPower |-- bNumConfigurations |-- bNumInterfaces |-- bcdDevice |-- bmAttributes |-- configuration |-- detach_state |-- devnum |-- driver -> ../../../../../../bus/usb/drivers/usb |-- idProduct |-- idVendor |-- manufacturer |-- maxchild |-- power | `-- state |-- product |-- speed
`-- version
udevinfo output
---------------
device '/sys/class/input/event2' has major:minor 13:66
looking at class device '/sys/class/input/event2':
SUBSYSTEM="input"
SYSFS{dev}="13:66"follow the class device's "device"
looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.2/2-1.2:1.0':
BUS="usb"
ID="2-1.2:1.0"
DRIVER="usbhid"
SYSFS{bAlternateSetting}=" 0"
SYSFS{bInterfaceClass}="03"
SYSFS{bInterfaceNumber}="00"
SYSFS{bInterfaceProtocol}="01"
SYSFS{bInterfaceSubClass}="01"
SYSFS{bNumEndpoints}="01"
SYSFS{detach_state}="0" looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.2':
BUS="usb"
ID="2-1.2"
DRIVER="usb"
SYSFS{bConfigurationValue}="1"
SYSFS{bDeviceClass}="00"
SYSFS{bDeviceProtocol}="00"
SYSFS{bDeviceSubClass}="00"
SYSFS{bMaxPower}="100mA"
SYSFS{bNumConfigurations}="1"
SYSFS{bNumInterfaces}=" 2"
SYSFS{bcdDevice}="0001"
SYSFS{bmAttributes}="a0"
SYSFS{configuration}="USB to PS2 Adaptor v1.12"
SYSFS{detach_state}="0"
SYSFS{devnum}="7"
SYSFS{idProduct}="0001"
SYSFS{idVendor}="0518"
SYSFS{manufacturer}="Composite USB PS2 Converter"
SYSFS{maxchild}="0"
SYSFS{product}="USB to PS2 Adaptor v1.12"
SYSFS{speed}="1.5"
SYSFS{version}=" 1.10" looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1':
BUS="usb"
ID="2-1"
DRIVER="usb"
SYSFS{bConfigurationValue}="1"
SYSFS{bDeviceClass}="09"
SYSFS{bDeviceProtocol}="01"
SYSFS{bDeviceSubClass}="00"
SYSFS{bMaxPower}="100mA"
SYSFS{bNumConfigurations}="1"
SYSFS{bNumInterfaces}=" 1"
SYSFS{bcdDevice}="0100"
SYSFS{bmAttributes}="e0"
SYSFS{detach_state}="0"
SYSFS{devnum}="2"
SYSFS{idProduct}="0058"
SYSFS{idVendor}="0409"
SYSFS{manufacturer}="NEC Corporation"
SYSFS{maxchild}="4"
SYSFS{product}="USB2.0 Hub Controller"
SYSFS{speed}="480"
SYSFS{version}=" 2.00" looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1d.7/usb2':
BUS="usb"
ID="usb2"
DRIVER="usb"
SYSFS{bConfigurationValue}="1"
SYSFS{bDeviceClass}="09"
SYSFS{bDeviceProtocol}="01"
SYSFS{bDeviceSubClass}="00"
SYSFS{bMaxPower}=" 0mA"
SYSFS{bNumConfigurations}="1"
SYSFS{bNumInterfaces}=" 1"
SYSFS{bcdDevice}="0206"
SYSFS{bmAttributes}="e0"
SYSFS{detach_state}="0"
SYSFS{devnum}="1"
SYSFS{idProduct}="0000"
SYSFS{idVendor}="0000"
SYSFS{manufacturer}="Linux 2.6.10blackrock20041231 ehci_hcd"
SYSFS{maxchild}="6"
SYSFS{product}="Intel Corp. 82801DB/DBM (ICH4/ICH4-M) USB 2.0 EHCI
Controller"
SYSFS{serial}="0000:00:1d.7"
SYSFS{speed}="480"
SYSFS{version}=" 2.00"looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7':
BUS="pci"
ID="0000:00:1d.7"
DRIVER="ehci_hcd"
SYSFS{class}="0x0c0320"
SYSFS{detach_state}="0"
SYSFS{device}="0x24cd"
SYSFS{irq}="11"
SYSFS{local_cpus}="1"
SYSFS{subsystem_device}="0x0001"
SYSFS{subsystem_vendor}="0x1179"
SYSFS{vendor}="0x8086" looking at the device chain at '/sys/devices/pci0000:00':
BUS=""
ID="pci0000:00"
DRIVER="unknown"
SYSFS{detach_state}="0"-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 10 lines · James Macfarlane
I've had a brief delve into the source and it looks unlikely to work either. It appears to search for attribute names in a pre-existing list, and everything between the curly braces counts as the attribute name (btw, I'm looking at ver 056, which is what my distro (debian testing) uses). So adding '/' is probably not going to work.
It walks the tree and breaks out of the loop once all the key-value pairs are matched, but it does all the SYSFS pairs in one loop. So unless all the SYSFS attributes are matched at one level, then the whole rule fails to match.
Out of curiosity, what file/line # is this at?
TIA.
Signature · 15 lines
==================================== Ian Pilcher [email protected] ==================================== ------------------------------------------------------- SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 1 line · Ian Pilcher
Out of curiosity, what file/line # is this at?
udev_rules.c, around line 623 onwards
James.
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 15 lines · James Macfarlane
Quoted 7 lines · Kay Sievers
How does:
tree/sys/...
of this device look like?What does:
udevinfo -a -p/sys/xxx...
print for this device?See at the bottom of this message.
Quoted 3 lines
I never tried this, but:
SYSFS{product/value}
may work to go into subdirs?
Quoted 6 lines
Not sure exactly you mean, in terms of syntax. I've just tried SYSFS{1.0/bInterfaceProtocol} but it didn't seem to work.
udevinfo says: "Only attributes within one device section may be used together in one rule, to match the device for which the node will be created." - that seems to indicate it won't work.
Yes that is right, but you can specify a path as attribute. Example:
[root@pim udev]# tree /sys/block/hda/
/sys/block/hda/
|-- dev |-- hda1 | |-- dev | |-- size | |-- start | `-- stat |-- queue | |-- iosched | | |-- antic_expire | | |-- est_time | | |-- read_batch_expire | | |-- read_expire | | |-- write_batch_expire | | `-- write_expire | |-- max_hw_sectors_kb | |-- max_sectors_kb | |-- nr_requests | |-- read_ahead_kb | `-- scheduler |-- range |-- removable |-- size
`-- stat
This matches:
KERNEL="hda", SYSFS{queue/iosched/est_time}="*", SYSFS{removable}="*", NAME="test"
Quoted 5 lines
I've had a brief delve into the source and it looks unlikely to work either. It appears to search for attribute names in a pre-existing list, and everything between the curly braces counts as the attribute name (btw, I'm looking at ver 056, which is what my distro (debian testing) uses). So adding '/' is probably not going to work.
Only in the way mentioned above, as a path.
Quoted 4 lines
It walks the tree and breaks out of the loop once all the key-value pairs are matched, but it does all the SYSFS pairs in one loop. So unless all the SYSFS attributes are matched at one level, then the whole rule fails to match.
Right.
But in your case, it may be the easiest to write a PROGRAM-script to catch your device...
Good luck,
Kay
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 104 lines · Ian Pilcher
I've got another example -- the AirPrime 5220 1xEVDO wireless modem for which Greg K-H just whipped out a driver. (Thanks Greg!)
This is a composite device with two serial ports:
Bus 004 Device 004: ID 0f3d:0112
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 16 idVendor 0x0f3d idProduct 0x0112 bcdDevice 0.01 iManufacturer 1 AirPrime, Incorporated iProduct 2 AirPrime CDMA Wireless PC Card iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 62 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 4 Data Interface Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type none Usage Type Data wMaxPacketSize 0x0010 bytes 16 once bInterval 128 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8a EP 10 IN bmAttributes 2 Transfer Type Bulk Synch Type none Usage Type Data wMaxPacketSize 0x0040 bytes 64 once bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x0b EP 11 OUT bmAttributes 2 Transfer Type Bulk Synch Type none Usage Type Data wMaxPacketSize 0x0040 bytes 64 once bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 4 Data Interface Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type none Usage Type Data wMaxPacketSize 0x0040 bytes 64 once bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x05 EP 5 OUT bmAttributes 2 Transfer Type Bulk Synch Type none Usage Type Data wMaxPacketSize 0x0040 bytes 64 once bInterval 0 Language IDs: (length=4) 0409 English(US)
Quoted 6 lines
The first port (bInterfaceNumber 0) is the CDMA modem port; the second port (bInterfaceNumber 1) is the "control port" which is used for diagnostic information, etc. I would like to create persistent names for these two ports (
/dev/cdma_modemand/dev/cdma_ctlor something similar). Since idVendor and idProduct are a directory above bInterfaceNumber, there doesn't appear to be any way to do this.
You can do this, as you get two different hotplug events. This is because usb drivers bind to the USB inteface, not the main device itself.
Quoted 1 line
This seems like a significant limitation for USB composite devices.
No, all USB devices work like this.
I'll try to make a udev rule that would work for this, can you send me the output of udevinfo for this:
udevinfo -a /sys/class/tty/ttyUSB0
udevinfo -a /sys/class/tty/ttyUSB1
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · Greg KH
Quoted 1 line · Ian Pilcher
This seems like a significant limitation for USB composite devices.
No, all USB devices work like this.
If I'm correct about what can't be done, there's no way to write a rule which identifies a device by vendor, product, and interface. It's possible to do vendor and product, so the limitation only affects composite devices.
Quoted 5 lines
I'll try to make a udev rule that would work for this, can you send me the output of udevinfo for this:
udevinfo -a/sys/class/tty/ttyUSB0
udevinfo -a/sys/class/tty/ttyUSB1
ttyUSB0 (the modem):
looking at class device '/sys/class/tty/ttyUSB0':
SYSFS{dev}="188:0"follow the class device's "device"
looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0000:03:00.0/usb4/4-1/4-1:1.0/ttyUSB0':
BUS="usb-serial"
ID="ttyUSB0"
SYSFS{detach_state}="0" looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0000:03:00.0/usb4/4-1/4-1:1.0':
BUS="usb"
ID="4-1:1.0"
SYSFS{bAlternateSetting}=" 0"
SYSFS{bInterfaceClass}="ff"
SYSFS{bInterfaceNumber}="00"
SYSFS{bInterfaceProtocol}="ff"
SYSFS{bInterfaceSubClass}="ff"
SYSFS{bNumEndpoints}="03"
SYSFS{detach_state}="0"
SYSFS{iInterface}="04" looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0000:03:00.0/usb4/4-1':
BUS="usb"
ID="4-1"
SYSFS{bConfigurationValue}="1"
SYSFS{bDeviceClass}="00"
SYSFS{bDeviceProtocol}="00"
SYSFS{bDeviceSubClass}="00"
SYSFS{bMaxPower}="100mA"
SYSFS{bNumConfigurations}="1"
SYSFS{bNumInterfaces}=" 2"
SYSFS{bcdDevice}="0001"
SYSFS{bmAttributes}="c0"
SYSFS{detach_state}="0"
SYSFS{devnum}="4"
SYSFS{idProduct}="0112"
SYSFS{idVendor}="0f3d"
SYSFS{manufacturer}="AirPrime, Incorporated"
SYSFS{maxchild}="0"
SYSFS{product}="AirPrime CDMA Wireless PC Card"
SYSFS{speed}="12"
SYSFS{version}=" 1.10" looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0000:03:00.0/usb4':
BUS="usb"
ID="usb4"
SYSFS{bConfigurationValue}="1"
SYSFS{bDeviceClass}="09"
SYSFS{bDeviceProtocol}="00"
SYSFS{bDeviceSubClass}="00"
SYSFS{bMaxPower}=" 0mA"
SYSFS{bNumConfigurations}="1"
SYSFS{bNumInterfaces}=" 1"
SYSFS{bcdDevice}="0206"
SYSFS{bmAttributes}="c0"
SYSFS{detach_state}="0"
SYSFS{devnum}="1"
SYSFS{idProduct}="0000"
SYSFS{idVendor}="0000"
SYSFS{manufacturer}="Linux 2.6.9-5.EL.root.evdo ohci_hcd"
SYSFS{maxchild}="2"
SYSFS{product}="OHCI Host Controller"
SYSFS{serial}="0000:03:00.0"
SYSFS{speed}="12"
SYSFS{version}=" 1.10" looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0000:03:00.0':
BUS="pci"
ID="0000:03:00.0"
SYSFS{class}="0x0c0310"
SYSFS{detach_state}="0"
SYSFS{device}="0x5802"
SYSFS{irq}="11"
SYSFS{subsystem_device}="0x5802"
SYSFS{subsystem_vendor}="0x11c1"
SYSFS{vendor}="0x11c1" looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0':
BUS="pci"
ID="0000:02:00.0"
SYSFS{class}="0x060700"
SYSFS{detach_state}="0"
SYSFS{device}="0xac55"
SYSFS{irq}="11"
SYSFS{subsystem_device}="0x0512"
SYSFS{subsystem_vendor}="0x1014"
SYSFS{vendor}="0x104c"looking at the device chain at '/sys/devices/pci0000:00/0000:00:1e.0':
BUS="pci"
ID="0000:00:1e.0"
SYSFS{class}="0x060400"
SYSFS{detach_state}="0"
SYSFS{device}="0x2448"
SYSFS{irq}="0"
SYSFS{subsystem_device}="0x0000"
SYSFS{subsystem_vendor}="0x0000"
SYSFS{vendor}="0x8086" looking at the device chain at '/sys/devices/pci0000:00':
BUS=""
ID="pci0000:00"
SYSFS{detach_state}="0"ttyUSB1 (the "control port"):
looking at class device '/sys/class/tty/ttyUSB1':
SYSFS{dev}="188:1"follow the class device's "device"
looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0000:03:00.0/usb4/4-1/4-1:1.1/ttyUSB1':
BUS="usb-serial"
ID="ttyUSB1"
SYSFS{detach_state}="0" looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0000:03:00.0/usb4/4-1/4-1:1.1':
BUS="usb"
ID="4-1:1.1"
SYSFS{bAlternateSetting}=" 0"
SYSFS{bInterfaceClass}="ff"
SYSFS{bInterfaceNumber}="01"
SYSFS{bInterfaceProtocol}="ff"
SYSFS{bInterfaceSubClass}="ff"
SYSFS{bNumEndpoints}="02"
SYSFS{detach_state}="0"
SYSFS{iInterface}="04" looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0000:03:00.0/usb4/4-1':
BUS="usb"
ID="4-1"
SYSFS{bConfigurationValue}="1"
SYSFS{bDeviceClass}="00"
SYSFS{bDeviceProtocol}="00"
SYSFS{bDeviceSubClass}="00"
SYSFS{bMaxPower}="100mA"
SYSFS{bNumConfigurations}="1"
SYSFS{bNumInterfaces}=" 2"
SYSFS{bcdDevice}="0001"
SYSFS{bmAttributes}="c0"
SYSFS{detach_state}="0"
SYSFS{devnum}="4"
SYSFS{idProduct}="0112"
SYSFS{idVendor}="0f3d"
SYSFS{manufacturer}="AirPrime, Incorporated"
SYSFS{maxchild}="0"
SYSFS{product}="AirPrime CDMA Wireless PC Card"
SYSFS{speed}="12"
SYSFS{version}=" 1.10" looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0000:03:00.0/usb4':
BUS="usb"
ID="usb4"
SYSFS{bConfigurationValue}="1"
SYSFS{bDeviceClass}="09"
SYSFS{bDeviceProtocol}="00"
SYSFS{bDeviceSubClass}="00"
SYSFS{bMaxPower}=" 0mA"
SYSFS{bNumConfigurations}="1"
SYSFS{bNumInterfaces}=" 1"
SYSFS{bcdDevice}="0206"
SYSFS{bmAttributes}="c0"
SYSFS{detach_state}="0"
SYSFS{devnum}="1"
SYSFS{idProduct}="0000"
SYSFS{idVendor}="0000"
SYSFS{manufacturer}="Linux 2.6.9-5.EL.root.evdo ohci_hcd"
SYSFS{maxchild}="2"
SYSFS{product}="OHCI Host Controller"
SYSFS{serial}="0000:03:00.0"
SYSFS{speed}="12"
SYSFS{version}=" 1.10" looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0/0000:03:00.0':
BUS="pci"
ID="0000:03:00.0"
SYSFS{class}="0x0c0310"
SYSFS{detach_state}="0"
SYSFS{device}="0x5802"
SYSFS{irq}="11"
SYSFS{subsystem_device}="0x5802"
SYSFS{subsystem_vendor}="0x11c1"
SYSFS{vendor}="0x11c1" looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.0':
BUS="pci"
ID="0000:02:00.0"
SYSFS{class}="0x060700"
SYSFS{detach_state}="0"
SYSFS{device}="0xac55"
SYSFS{irq}="11"
SYSFS{subsystem_device}="0x0512"
SYSFS{subsystem_vendor}="0x1014"
SYSFS{vendor}="0x104c"looking at the device chain at '/sys/devices/pci0000:00/0000:00:1e.0':
BUS="pci"
ID="0000:00:1e.0"
SYSFS{class}="0x060400"
SYSFS{detach_state}="0"
SYSFS{device}="0x2448"
SYSFS{irq}="0"
SYSFS{subsystem_device}="0x0000"
SYSFS{subsystem_vendor}="0x0000"
SYSFS{vendor}="0x8086" looking at the device chain at '/sys/devices/pci0000:00':
BUS=""
ID="pci0000:00"
SYSFS{detach_state}="0"Thanks!
Signature · 15 lines
==================================== Ian Pilcher [email protected] ==================================== ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel