summaryrefslogtreecommitdiffstats
path: root/rules.d/60-persistent-v4l.rules
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-05-01 19:28:35 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-05-20 07:27:10 +0200
commit873be895ed1fe65010fb84c6b71e2ec0a6b6fc91 (patch)
tree4dc0f229a4c4585136f1b06ce516c2df196b2a68 /rules.d/60-persistent-v4l.rules
parentudev-builtin-path_id: split out add_id_tag() (diff)
downloadsystemd-873be895ed1fe65010fb84c6b71e2ec0a6b6fc91.tar.xz
systemd-873be895ed1fe65010fb84c6b71e2ec0a6b6fc91.zip
udev: add USB revision in ID_PATH
xHCI host controller may register two (or more?) USB root hubs for USB 2.0 and USB 3.0, and devices under the hubs may have same ID_PATH. So, to avoid the conflict, let's introduce ID_PATH_WITH_USB_REVISION that includes the USB revision. Closes #19406.
Diffstat (limited to 'rules.d/60-persistent-v4l.rules')
-rw-r--r--rules.d/60-persistent-v4l.rules6
1 files changed, 4 insertions, 2 deletions
diff --git a/rules.d/60-persistent-v4l.rules b/rules.d/60-persistent-v4l.rules
index 93c5ee8c27..071650a45b 100644
--- a/rules.d/60-persistent-v4l.rules
+++ b/rules.d/60-persistent-v4l.rules
@@ -14,7 +14,9 @@ TEST!="index", GOTO="persistent_v4l_end"
ATTR{index}!="?*", GOTO="persistent_v4l_end"
IMPORT{builtin}="path_id"
-ENV{ID_PATH}=="?*", KERNEL=="video*|vbi*", SYMLINK+="v4l/by-path/$env{ID_PATH}-video-index$attr{index}"
-ENV{ID_PATH}=="?*", KERNEL=="audio*", SYMLINK+="v4l/by-path/$env{ID_PATH}-audio-index$attr{index}"
+KERNEL=="video*|vbi*", ENV{ID_PATH}=="?*", SYMLINK+="v4l/by-path/$env{ID_PATH}-video-index$attr{index}"
+KERNEL=="video*|vbi*", ENV{ID_PATH_WITH_USB_REVISION}=="?*", SYMLINK+="v4l/by-path/$env{ID_PATH_WITH_USB_REVISION}-video-index$attr{index}"
+KERNEL=="audio*", ENV{ID_PATH}=="?*", SYMLINK+="v4l/by-path/$env{ID_PATH}-audio-index$attr{index}"
+KERNEL=="audio*", ENV{ID_PATH_WITH_USB_REVISION}=="?*", SYMLINK+="v4l/by-path/$env{ID_PATH_WITH_USB_REVISION}-audio-index$attr{index}"
LABEL="persistent_v4l_end"