From f5989d032d6537dc30870b84ce3df7368eb22586 Mon Sep 17 00:00:00 2001 From: adrian Date: Thu, 31 Oct 2013 13:54:51 +0000 Subject: [PATCH] Allow the Arduino Leonardo to work by supporting CDC=0 devices. CDC=0 simply means "no command codes", CDC=1 means "AT command codes." There's no driver change required! It's purely to tell the application layer whether to speak AT commands or not. Things are all still serial. PR: usb/183505 Reviewed by: hps MFC after: 1 week --- sys/dev/usb/serial/umodem.c | 3 +++ sys/dev/usb/usb.h | 1 + 2 files changed, 4 insertions(+) diff --git a/sys/dev/usb/serial/umodem.c b/sys/dev/usb/serial/umodem.c index d0dc364814fe..163cdfbfff02 100644 --- a/sys/dev/usb/serial/umodem.c +++ b/sys/dev/usb/serial/umodem.c @@ -128,6 +128,9 @@ static const STRUCT_USB_HOST_ID umodem_devs[] = { {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(UIPROTO_CDC_AT)}, + {USB_IFACE_CLASS(UICLASS_CDC), + USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), + USB_IFACE_PROTOCOL(UIPROTO_CDC_NONE)}, /* Huawei Modem class match */ {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h index b8b52d5abb9d..3e014521c2bc 100644 --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -441,6 +441,7 @@ typedef struct usb_interface_assoc_descriptor usb_interface_assoc_descriptor_t; #define UISUBCLASS_ETHERNET_EMULATION_MODEL 12 #define UISUBCLASS_NETWORK_CONTROL_MODEL 13 +#define UIPROTO_CDC_NONE 0 #define UIPROTO_CDC_AT 1 #define UICLASS_HID 0x03