diff --git a/sys/bus/u4b/net/if_urndis.c b/sys/bus/u4b/net/if_urndis.c index 0407f25..fd6d4d8 100644 --- a/sys/bus/u4b/net/if_urndis.c +++ b/sys/bus/u4b/net/if_urndis.c @@ -167,23 +167,32 @@ static const struct usb_ether_methods urndis_ue_methods = { }; static const STRUCT_USB_HOST_ID urndis_host_devs[] = { -#if 0 - /* XXX this entry has a conflict an entry the umodem driver XXX */ - {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), - USB_IFACE_PROTOCOL(0xff)}, -#endif {USB_IFACE_CLASS(UICLASS_WIRELESS), USB_IFACE_SUBCLASS(UISUBCLASS_RF), USB_IFACE_PROTOCOL(UIPROTO_RNDIS)}, {USB_IFACE_CLASS(UICLASS_IAD), USB_IFACE_SUBCLASS(UISUBCLASS_SYNC), USB_IFACE_PROTOCOL(UIPROTO_ACTIVESYNC)}, }; +static const STRUCT_USB_HOST_ID urndis_host_not_huawei_devs[] = { + {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), + USB_IFACE_PROTOCOL(0xff)}, +}; + static int urndis_probe(device_t dev) { + int res; struct usb_attach_arg *uaa = device_get_ivars(dev); - return (usbd_lookup_id_by_uaa(urndis_host_devs, sizeof(urndis_host_devs), uaa)); + res = usbd_lookup_id_by_uaa(urndis_host_devs, sizeof(urndis_host_devs), uaa); + if (res == 0) { + return(0); + } + if (uaa->info.idVendor == USB_VENDOR_HUAWEI) { + return(ENXIO); + } + return (usbd_lookup_id_by_uaa(urndis_host_not_huawei_devs, sizeof(urndis_host_not_huawei_devs), uaa)); + } static void diff --git a/sys/bus/u4b/serial/umodem.c b/sys/bus/u4b/serial/umodem.c index d164ee3..2b6aa00 100644 --- a/sys/bus/u4b/serial/umodem.c +++ b/sys/bus/u4b/serial/umodem.c @@ -124,7 +124,8 @@ static const STRUCT_USB_HOST_ID umodem_devs[] = { USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(UIPROTO_CDC_AT)}, /* Huawei Modem class match */ - {USB_IFACE_CLASS(UICLASS_CDC), + {USB_VENDOR(USB_VENDOR_HUAWEI), + USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(0xFF)}, /* Kyocera AH-K3001V */