diff options
| author | blymn <blymn@NetBSD.org> | 2012-06-14 05:14:41 +0000 |
|---|---|---|
| committer | blymn <blymn@NetBSD.org> | 2012-06-14 05:14:41 +0000 |
| commit | 8a2148c18da2f47e51da7a403aab8780ea5faebc (patch) | |
| tree | 36c9837e53a97239c4ec0986b1c98ea7a92976b0 /sys/dev/usb | |
| parent | 0556cbfe7d78f6a5d28fab402cfc05ba8b343eed (diff) | |
Add the CDC protocol identifier "no class specific protocol required"
and allow the umodem match routine to match on this protocol. This
allows some recent arduino boards serial interfaces to attach.
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/umodem.c | 6 | ||||
| -rw-r--r-- | sys/dev/usb/usb.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index 21e2511e10d..4b1402b1802 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -1,4 +1,4 @@ -/* $NetBSD: umodem.c,v 1.63 2012/02/24 06:48:27 mrg Exp $ */ +/* $NetBSD: umodem.c,v 1.64 2012/06/14 05:14:41 blymn Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.63 2012/02/24 06:48:27 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.64 2012/06/14 05:14:41 blymn Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -100,7 +100,7 @@ umodem_match(device_t parent, cfdata_t match, void *aux) if (uaa->class != UICLASS_CDC || uaa->subclass != UISUBCLASS_ABSTRACT_CONTROL_MODEL || - uaa->proto != UIPROTO_CDC_AT) + !(uaa->proto == UIPROTO_CDC_NOCLASS || uaa->proto == UIPROTO_CDC_AT)) return (UMATCH_NONE); id = usbd_get_interface_descriptor(uaa->iface); diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h index e146ea7e1d3..9b1bbdbd6f7 100644 --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -1,4 +1,4 @@ -/* $NetBSD: usb.h,v 1.94 2012/03/06 02:49:03 mrg Exp $ */ +/* $NetBSD: usb.h,v 1.95 2012/06/14 05:14:41 blymn Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $ */ /* @@ -481,6 +481,8 @@ typedef struct { #define UISUBCLASS_CAPI_CONTROLMODEL 5 #define UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL 6 #define UISUBCLASS_ATM_NETWORKING_CONTROL_MODEL 7 +#define UIPROTO_CDC_NOCLASS 0 /* no class specific + protocol required */ #define UIPROTO_CDC_AT 1 #define UICLASS_HID 0x03 |
