From: Mario Limonciello <mario_limonciello@dell.com>
To: linux-hotplug@vger.kernel.org
Subject: REMOVE_CMD not always populated
Date: Mon, 17 Aug 2009 18:27:56 +0000 [thread overview]
Message-ID: <4A89A12C.7090000@dell.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 7657 bytes --]
Hi:
In testing the hid2hci stuff that landed in udev-146 and the kernel
patch that Alan Stern submitted to fix the race condition with uevents,
i've been finding that udev doesn't alway populate REMOVE_CMD even when
the rule is matching it. I'm not really sure where to start looking to
debug.
Here's what the udev DB looks like when REMOVE_CMD doesn't get added:
$ udevadm info --query=all
--path=/devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3
P: /devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3
N: bus/usb/003/009
S: char/189:264
E: DEVPATH=/devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3
E: MAJOR=189
E: MINOR=264
E: DEVNAME=/dev/bus/usb/003/009
E: DEVTYPE=usb_device
E: DRIVER=usb
E: PRODUCT=413c/8156/456
E: TYPE=224/1/1
E: BUSNUM=003
E: DEVNUM=009
E: ID_VENDOR=Dell_Computer_Corp
E: ID_VENDOR_ENC=Dell\x20Computer\x20Corp
E: ID_VENDOR_ID=413c
E: ID_MODEL=Dell_Wireless_370_Bluetooth_Mini-card
E: ID_MODEL_ENC=Dell\x20Wireless\x20370\x20Bluetooth\x20Mini-card
E: ID_MODEL_ID=8156
E: ID_REVISION=0456
E: ID_SERIAL=Dell_Computer_Corp_Dell_Wireless_370_Bluetooth_Mini-card
E: ID_BUS=usb
E: ID_USB_INTERFACES=:e00101:ffffff:fe0100:
E: DEVLINKS=/dev/char/189:264
So you can see no REMOVE_CMD. If I run a udevadm test run against the
device, the REMOVE_CMD is listed.
$udevadm test /devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3 2>&1
run_command: calling: test
udevadm_test: version 146
add_matching_files: unable to open '/usr/etc/udev/rules.d': No such file
or directory
parse_file: reading '/usr/libexec/rules.d/50-firmware.rules' as rules file
parse_file: reading '/usr/libexec/rules.d/50-udev-default.rules' as
rules file
parse_file: reading '/usr/libexec/rules.d/60-cdrom_id.rules' as rules file
parse_file: reading '/usr/libexec/rules.d/60-persistent-alsa.rules' as
rules file
parse_file: reading '/usr/libexec/rules.d/60-persistent-input.rules' as
rules file
parse_file: reading '/usr/libexec/rules.d/60-persistent-serial.rules' as
rules file
parse_file: reading
'/usr/libexec/rules.d/60-persistent-storage-tape.rules' as rules file
parse_file: reading '/usr/libexec/rules.d/60-persistent-storage.rules'
as rules file
parse_file: reading '/usr/libexec/rules.d/60-persistent-v4l.rules' as
rules file
parse_file: reading '/usr/libexec/rules.d/61-mobile-action.rules' as
rules file
parse_file: reading
'/usr/libexec/rules.d/61-option-modem-modeswitch.rules' as rules file
parse_file: reading
'/usr/libexec/rules.d/61-persistent-storage-edd.rules' as rules file
parse_file: reading '/usr/libexec/rules.d/70-acl.rules' as rules file
parse_file: reading '/usr/libexec/rules.d/70-hid2hci.rules' as rules file
parse_file: reading '/usr/libexec/rules.d/75-cd-aliases-generator.rules'
as rules file
parse_file: reading '/usr/libexec/rules.d/75-net-description.rules' as
rules file
parse_file: reading
'/usr/libexec/rules.d/75-persistent-net-generator.rules' as rules file
parse_file: reading '/usr/libexec/rules.d/75-tty-description.rules' as
rules file
parse_file: reading '/usr/libexec/rules.d/78-sound-card.rules' as rules file
parse_file: reading '/usr/libexec/rules.d/79-fstab_import.rules' as
rules file
parse_file: reading '/usr/libexec/rules.d/80-drivers.rules' as rules file
parse_file: reading '/usr/libexec/rules.d/95-keymap.rules' as rules file
parse_file: reading '/usr/libexec/rules.d/95-udev-late.rules' as rules file
udev_rules_new: rules use 18744 bytes tokens (1562 * 12 bytes), 11469
bytes buffer
udev_rules_new: temporary index used 12360 bytes (618 * 20 bytes)
udev_device_new_from_syspath: device 0x862e5d0 has devpath
'/devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3'
udev_device_new_from_syspath: device 0x861ba28 has devpath
'/devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3'
udev_device_read_db: device 0x861ba28 filled with db file data
udev_rules_apply_to_event: LINK 'char/189:264'
/usr/libexec/rules.d/50-udev-default.rules:4
udev_rules_apply_to_event: MODE 0664
/usr/libexec/rules.d/50-udev-default.rules:54
udev_rules_apply_to_event: NAME 'bus/usb/003/009'
/usr/libexec/rules.d/50-udev-default.rules:54
udev_device_new_from_syspath: device 0x861bcd8 has devpath
'/devices/pci0000:00/0000:00:04.0/usb3/3-4'
udev_device_new_from_syspath: device 0x861c178 has devpath
'/devices/pci0000:00/0000:00:04.0/usb3'
udev_device_new_from_syspath: device 0x861c2c0 has devpath
'/devices/pci0000:00/0000:00:04.0'
udev_device_new_from_syspath: device 0x861c400 has devpath
'/devices/pci0000:00'
udev_rules_apply_to_event: IMPORT 'usb_id --export
/devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3'
/usr/libexec/rules.d/70-acl.rules:7
util_run_program: 'usb_id --export
/devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3' started
util_run_program: '/usr/libexec/usb_id' (stdout)
'ID_VENDOR=Dell_Computer_Corp'
util_run_program: '/usr/libexec/usb_id' (stdout)
'ID_VENDOR_ENC=Dell\x20Computer\x20Corp'
util_run_program: '/usr/libexec/usb_id' (stdout) 'ID_VENDOR_ID=413c'
util_run_program: '/usr/libexec/usb_id' (stdout)
'ID_MODEL=Dell_Wireless_370_Bluetooth_Mini-card'
util_run_program: '/usr/libexec/usb_id' (stdout)
'ID_MODEL_ENC=Dell\x20Wireless\x20370\x20Bluetooth\x20Mini-card'
util_run_program: '/usr/libexec/usb_id' (stdout) 'ID_MODEL_ID=8156'
util_run_program: '/usr/libexec/usb_id' (stdout) 'ID_REVISION=0456'
util_run_program: '/usr/libexec/usb_id' (stdout)
'ID_SERIAL=Dell_Computer_Corp_Dell_Wireless_370_Bluetooth_Mini-card'
util_run_program: '/usr/libexec/usb_id' (stdout) 'ID_BUS=usb'
util_run_program: '/usr/libexec/usb_id' (stdout)
'ID_USB_INTERFACES=:e00101:ffffff:fe0100:'
util_run_program: 'usb_id --export
/devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3' returned with exitcode 0
udev_device_update_db: unable to create db file
'/dev/.udev/db/\x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2fusb3\x2f3-4\x2f3-4.3':
Permission denied
udev_node_add: creating device node '/dev/bus/usb/003/009',
devnum=189:264, mode=0664, uid=0, gid=0
udev_node_mknod: preserve file '/dev/bus/usb/003/009', because it has
correct dev_t
update_link: '/dev/char/189:264' with target '/dev/bus/usb/003/009' has
the highest priority 0, create it
node_symlink: preserve already existing symlink '/dev/char/189:264' to
'../bus/usb/003/009'
udevadm_test: UDEV_LOG=6
udevadm_test: DEVPATH=/devices/pci0000:00/0000:00:04.0/usb3/3-4/3-4.3
udevadm_test: MAJOR=189
udevadm_test: MINOR=264
udevadm_test: DEVNAME=/dev/bus/usb/003/009
udevadm_test: DEVTYPE=usb_device
udevadm_test: DRIVER=usb
udevadm_test: PRODUCT=413c/8156/456
udevadm_test: TYPE=224/1/1
udevadm_test: BUSNUM=003
udevadm_test: DEVNUM=009
udevadm_test: ACTION=add
udevadm_test: SUBSYSTEM=usb
udevadm_test: DEVLINKS=/dev/char/189:264
udevadm_test: ID_VENDOR=Dell_Computer_Corp
udevadm_test: ID_VENDOR_ENC=Dell\x20Computer\x20Corp
udevadm_test: ID_VENDOR_ID=413c
udevadm_test: ID_MODEL=Dell_Wireless_370_Bluetooth_Mini-card
udevadm_test: ID_MODEL_ENC=Dell\x20Wireless\x20370\x20Bluetooth\x20Mini-card
udevadm_test: ID_MODEL_ID=8156
udevadm_test: ID_REVISION=0456
udevadm_test:
ID_SERIAL=Dell_Computer_Corp_Dell_Wireless_370_Bluetooth_Mini-card
udevadm_test: ID_BUS=usb
udevadm_test: ID_USB_INTERFACES=:e00101:ffffff:fe0100:
udevadm_test: REMOVE_CMD=/sbin/udevadm trigger --action=change
--subsystem-match=usb --property-match=HID2HCI_SWITCH=1
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.
--
Mario Limonciello
*Dell | Linux Engineering*
mario_limonciello@dell.com
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
next reply other threads:[~2009-08-17 18:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 18:27 Mario Limonciello [this message]
2009-08-18 0:04 ` REMOVE_CMD not always populated 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=4A89A12C.7090000@dell.com \
--to=mario_limonciello@dell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.