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@xxxxxxxx
Attachment:
signature.asc
Description: OpenPGP digital signature