mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-04 22:11:41 +00:00
ModemManager likes to play with serial ports it shouldn't play with, mark our serial ports as off limits. This also bumps the ordering of this rules file just past the udev default rules because it uses environment variables populated by that file. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=install new rules file, delete old rules file verify that symlinks to TTY's are still created verify that ModemManager leaves them alone now Change-Id: I4ded95192d78b5b1bbc661ca5b762e18307d2d60 Reviewed-on: https://chromium-review.googlesource.com/269743 Trybot-Ready: Anton Staaf <robotboy@chromium.org> Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
34 lines
1.7 KiB
Plaintext
34 lines
1.7 KiB
Plaintext
#
|
|
# Rules for Google Case Closed Debugging devices.
|
|
#
|
|
# The first rule matches the google VID and records the product name, USB bus
|
|
# number and USB device path (the device path is the list of hub ports between
|
|
# the root and the device). This becomes a unique directory name under which
|
|
# later rules can create symlinks. If this rule doesn't match udev will skip
|
|
# the rest of this files rules.
|
|
#
|
|
# This rule intentionally matches using SUBSYSTEMS and ATTRS instead of
|
|
# SUBSYSTEM and ATTR so that the GOOGLE_CCD_NAME is available to all nodes
|
|
# that descend from a Google USB device (this includes all USB interface nodes
|
|
# as well as all of the TTY nodes derived from CCD USB interfaces).
|
|
#
|
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ENV{GOOGLE_CCD_NAME}="$attr{product}-$attr{busnum}-$attr{devpath}"
|
|
|
|
#
|
|
# Force ModemManager to ignore all Google case closed debug devices. It would
|
|
# be better to just ignore the case closed debug serial console interfaces, but
|
|
# ModemManager doesn't look at the usb_interface udev node, it looks at the
|
|
# usb_device node, so you have to mark the entire device as incompatible with
|
|
# ModemManager.
|
|
#
|
|
# This node could lose the match against the usb_device DEVTYPE and still work,
|
|
# it would just add extraneous ID_MM_DEVICE_IGNORE tags to the TTY and USB
|
|
# interface nodes.
|
|
#
|
|
SUBSYSTEM=="usb", ENV{GOOGLE_CCD_NAME}!="", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:ff5001:*", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
|
|
#
|
|
# Construct a symlink to a TTY generated from a CCD USB serial interface.
|
|
#
|
|
SUBSYSTEM=="tty", ENV{GOOGLE_CCD_NAME}!="", ATTRS{bInterfaceClass}=="ff", ATTRS{bInterfaceSubClass}=="50", ATTRS{bInterfaceProtocol}=="01", OPTIONS+="string_escape=replace", SYMLINK+="google/$env{GOOGLE_CCD_NAME}/serial/$attr{interface}"
|