udev: Don't mark disconnected RFCOMM ttys as candidates

Bluetooth serial devices are weird. They begin life being bound with
RFCOMMCREATEDEV ioctl() and then move around the sysfs tree when they are
connected and disconnected. The connection is estabilished upon the first
open() and torn down upon last close(), their first user virtually being
"owner" of the connection. We don't want to be that process, we're only
interested in actually connected modems. However, currently we have no
knowledge of that and therefore we connect and disconnect multiple times while
probing.

This patch marks unconnected RFCOMM devices as uninteresting to us.
The actual connection and disconnection will be handled by NetworkManager.
This commit is contained in:
Lubomir Rintel
2014-11-01 20:07:40 +01:00
committed by Aleksander Morgado
parent f79ec9bf4d
commit d44690489b
+4
View File
@@ -9,6 +9,10 @@
ACTION!="add|change|move", GOTO="mm_candidate_end"
# Opening bound but disconnected Bluetooth RFCOMM ttys would initiate the
# connection. Don't do that.
KERNEL=="rfcomm[0-9]*", DEVPATH=="*/virtual/*", GOTO="mm_candidate_end"
SUBSYSTEM=="tty", ENV{ID_MM_CANDIDATE}="1"
SUBSYSTEM=="net", ENV{ID_MM_CANDIDATE}="1"
KERNEL=="cdc-wdm*", SUBSYSTEM=="usb", ENV{ID_MM_CANDIDATE}="1"