summaryrefslogtreecommitdiff
path: root/src/77-mm-usb-device-blacklist.rules
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-05-27 16:39:17 +0200
committerAleksander Morgado <aleksander@aleksander.es>2018-06-02 16:54:37 +0200
commitc07382a486f53e1b3cf729b41518d2a0ba528f5a (patch)
treeba0f419c995de0ff97ca3fbeb92c91b084c5cba4 /src/77-mm-usb-device-blacklist.rules
parent4bc7d6862d3b908476e8bddd70cfc9e571dc9622 (diff)
udev: add tags also on bind action
When a new USB device is hotplugged, e.g. a USB<->RS232 converter that exposes a single ttyUSB0, these udev events happen: add /devices/pci0000:00/0000:00:14.0/usb2/2-1 (usb/usb-device) add /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0 (usb/usb-interface) add /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0 (usb-serial) add /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0/tty/ttyUSB0 (tty) bind /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0/ttyUSB0 (usb-serial) bind /devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.0 (usb/usb-interface) bind /devices/pci0000:00/0000:00:14.0/usb2/2-1 (usb/usb-device) Our udev rules in MM only added tags in the 'add' events, and it looks like the only ones 'persistent' after this sequence are those of the last event happening on the specific path. This meant that all TTY subsystem rules (e.g. ID_MM_CANDIDATE) would be stored for later check (e.g. if ModemManager is started after these rules have been applied), which was ok. "udevadm info -p ..." would show these tags correctly always. But this also meant that the 'bind' udev event happening for the USB device didn't get any of our device-specific tags, and so we would be missing them (e.g. ID_MM_DEVICE_MANUAL_SCAN_ONLY) if MM is started after the last event has happened. "udevadm info -p ..." would not show these tags. Modify all our rules to also run at the 'bind' events. See, for context: https://github.com/systemd/systemd/issues/8221
Diffstat (limited to 'src/77-mm-usb-device-blacklist.rules')
-rw-r--r--src/77-mm-usb-device-blacklist.rules2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/77-mm-usb-device-blacklist.rules b/src/77-mm-usb-device-blacklist.rules
index e06643ad..854739a6 100644
--- a/src/77-mm-usb-device-blacklist.rules
+++ b/src/77-mm-usb-device-blacklist.rules
@@ -1,6 +1,6 @@
# do not edit this file, it will be overwritten on update
-ACTION!="add|change|move", GOTO="mm_usb_device_blacklist_end"
+ACTION!="add|change|move|bind", GOTO="mm_usb_device_blacklist_end"
SUBSYSTEM!="usb", GOTO="mm_usb_device_blacklist_end"
# APC UPS devices