diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-05-01 19:28:35 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-05-20 07:27:10 +0200 |
commit | 873be895ed1fe65010fb84c6b71e2ec0a6b6fc91 (patch) | |
tree | 4dc0f229a4c4585136f1b06ce516c2df196b2a68 /rules.d/60-persistent-storage-tape.rules | |
parent | udev-builtin-path_id: split out add_id_tag() (diff) | |
download | systemd-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-storage-tape.rules')
-rw-r--r-- | rules.d/60-persistent-storage-tape.rules | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/rules.d/60-persistent-storage-tape.rules b/rules.d/60-persistent-storage-tape.rules index 803f82c583..0678d71e6d 100644 --- a/rules.d/60-persistent-storage-tape.rules +++ b/rules.d/60-persistent-storage-tape.rules @@ -19,7 +19,8 @@ ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL} tape/by-id/scsi- ENV{ID_SCSI_SERIAL}=="?*", SYMLINK+="tape/by-id/scsi-$env{ID_SCSI_SERIAL}" IMPORT{builtin}="path_id" -ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-changer" +ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-changer" +ENV{ID_PATH_WITH_USB_REVISION}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH_WITH_USB_REVISION}-changer" LABEL="medium_changer_end" @@ -36,7 +37,9 @@ KERNEL=="nst*[0-9]", ENV{ID_SCSI_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS # by-path (parent device path) KERNEL=="st*[0-9]|nst*[0-9]", IMPORT{builtin}="path_id" -KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" -KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-nst" +KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" +KERNEL=="st*[0-9]", ENV{ID_PATH_WITH_USB_REVISION}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH_WITH_USB_REVISION}" +KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-nst" +KERNEL=="nst*[0-9]", ENV{ID_PATH_WITH_USB_REVISION}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH_WITH_USB_REVISION}-nst" LABEL="persistent_storage_tape_end" |