I'm unaware of any requirements around composite device classes like
that; the current behavior sure looks like a heuristic that nobody's
cared enough to make any changes to since about 2013.
As a comparison, it looks like ModemManager does some similar checks
[1]: MM_FILTER_RULE_TTY_ACM_INTERFACE matches a USB-CDC device where
the protocol is one of the AT protocols (bInterfaceProtocol is between
1 and 6, inclusive) and otherwise ignores a device. However
MM_FILTER_RULE_TTY_WITH_NET appears to decide a device that provides
both tty and net devices should be treated as a modem; it looks like
the TTY_WITH_NET check runs first and will then defer to the decision
of TTY_ACM_INTERFACE (I'm not very confident of that, though), so I
believe ModemManager will ignore a device such as yours unless udev
rules say otherwise.
So in a vacuum I imagine checking bInterfaceProtocol would be an
improvement to the existing heuristic in shill, but it's difficult to
tell if anybody depends on the current behavior who would be broken by
a change (that is, has a modem that doesn't set bInterfaceProtocol
correctly). Given ChromeOS doesn't make it possible to adjust udev
rules that seems like a risky change, but it also uses ModemManager
under the hood and I'm not sure how shill interacts with ModemManager
so perhaps it would be a strict improvement to better synchronize
their ideas of what a modem looks like.
[1]:
https://modemmanager.org/docs/modemmanager/port-and-device-detection/#port-selection-filters-in-modemmanager
> --
> --
> ChromiumOS Developers mailing list:
chromiu...@chromium.org
> View archives, change email options, or unsubscribe:
>
https://groups.google.com/a/chromium.org/group/chromium-os-dev