the Quectel LTE&5G Linux USB Driver User Guide V2.0 says umsm should
only attach to usb interfaces 0 to 3 using the interface class
UICLASS_VENDOR. their doco uses magic numbers, but this is what
they mean.
interfaces 4 and above provide network (not serial) via qmi, ecm,
or mbim. preventing umsm from attaching to the high interfaces
allows the appropriate network driver to use it instead. eg, umb
is now able to attach to the network interface because it presents
a standard mbim class.
discussed with and tested by kevlo@
ok patric@ sthen@ kevlo@
-/* $OpenBSD: umsm.c,v 1.123 2023/03/31 23:55:45 dlg Exp $ */
+/* $OpenBSD: umsm.c,v 1.124 2023/04/01 00:04:40 dlg Exp $ */
/*
* Copyright (c) 2008 Yojiro UO <yuo@nui.org>
(id->bInterfaceSubClass == 0x00 &&
id->bInterfaceProtocol == 0x00)))) {
return UMATCH_NONE;
+
+ /* See the Quectel LTE&5G Linux USB Driver User Guide */
+ } else if (uaa->vendor == USB_VENDOR_QUECTEL) {
+ /* Some interfaces can be used as network devices */
+ if (id->bInterfaceClass != UICLASS_VENDOR)
+ return UMATCH_NONE;
+
+ /* Interface 4 can be used as a network device */
+ if (uaa->ifaceno >= 4)
+ return UMATCH_NONE;
}
return UMATCH_VENDOR_IFACESUBCLASS;