aboutsummaryrefslogtreecommitdiff
path: root/plugins/simtech
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2016-09-18 14:08:20 +0200
committerAleksander Morgado <aleksander@aleksander.es>2016-09-18 14:08:20 +0200
commitaa0e1081070b1062c696d31ed3c68e9511733ad1 (patch)
treeb30826dc7c9bd5ae2b807bda98f480890b25074d /plugins/simtech
parent546d33db6c8faa9a6ab48ae3e00a0c8339a576a8 (diff)
udev: fix SUBSYSTEMS and ATTRS{idVendor} checks
Rules with a single condition where a parent property is checked with != don't work properly. E.g.: SUBSYSTEMS!="usb", GOTO="end" or: ATTRS{idVendor}!="abcd", GOTO="end" Instead, we can mix both those previous parent rules and match them: SUBSYSTEMS=="usb",ATTRS{idVendor}=="abcd", GOTO="next" GOTO="end" LABEL="next" # Apply rules here LABEL="end" In this case both SUBSYSTEMS and ATTRS conditions apply to the parent usb_device (idVendor attribute is only available in the usb_device), so they apply to all ports of the same device.
Diffstat (limited to 'plugins/simtech')
-rw-r--r--plugins/simtech/77-mm-simtech-port-types.rules7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/simtech/77-mm-simtech-port-types.rules b/plugins/simtech/77-mm-simtech-port-types.rules
index a13d2c18..f91b270c 100644
--- a/plugins/simtech/77-mm-simtech-port-types.rules
+++ b/plugins/simtech/77-mm-simtech-port-types.rules
@@ -11,9 +11,10 @@
ACTION!="add|change|move", GOTO="mm_simtech_port_types_end"
-SUBSYSTEMS!="usb", GOTO="mm_simtech_port_types_end"
-SUBSYSTEM!="tty", GOTO="mm_simtech_port_types_end"
-ATTRS{idVendor}!="1e0e", GOTO="mm_simtech_port_types_end"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1e0e", GOTO="mm_simtech_port_types"
+GOTO="mm_simtech_port_types_end"
+
+LABEL="mm_simtech_port_types"
# A-LINK 3GU
ATTRS{idVendor}=="1e0e", ATTRS{idProduct}=="cefe", ATTRS{bInterfaceNumber}=="02", ENV{ID_MM_SIMTECH_PORT_TYPE_MODEM}="1"