Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Add the CDC protocol identifier "no class specif...
details: https://anonhg.NetBSD.org/src/rev/a22a9b612922
branches: trunk
changeset: 779732:a22a9b612922
user: blymn <blymn%NetBSD.org@localhost>
date: Thu Jun 14 05:14:41 2012 +0000
description:
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:
sys/dev/usb/umodem.c | 6 +++---
sys/dev/usb/usb.h | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (45 lines):
diff -r ee88c7cd1ad7 -r a22a9b612922 sys/dev/usb/umodem.c
--- a/sys/dev/usb/umodem.c Thu Jun 14 04:23:48 2012 +0000
+++ b/sys/dev/usb/umodem.c Thu Jun 14 05:14:41 2012 +0000
@@ -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 @@
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 -r ee88c7cd1ad7 -r a22a9b612922 sys/dev/usb/usb.h
--- a/sys/dev/usb/usb.h Thu Jun 14 04:23:48 2012 +0000
+++ b/sys/dev/usb/usb.h Thu Jun 14 05:14:41 2012 +0000
@@ -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 @@
#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
Home |
Main Index |
Thread Index |
Old Index