From 8a2148c18da2f47e51da7a403aab8780ea5faebc Mon Sep 17 00:00:00 2001 From: blymn Date: Thu, 14 Jun 2012 05:14:41 +0000 Subject: 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. --- sys/dev/usb/umodem.c | 6 +++--- sys/dev/usb/usb.h | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'sys/dev/usb') 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 -__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 #include @@ -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 -- cgit