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:
committed by
Aleksander Morgado
parent
f79ec9bf4d
commit
d44690489b
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user