From owner-freebsd-usb@FreeBSD.ORG Thu Oct 31 07:21:59 2013 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 84DE899; Thu, 31 Oct 2013 07:21:59 +0000 (UTC) (envelope-from hps@bitfrost.no) Received: from mta.bitpro.no (mta.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id 41BD125A2; Thu, 31 Oct 2013 07:21:59 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta.bitpro.no (Postfix) with ESMTP id 6D4057A1E6; Thu, 31 Oct 2013 08:21:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id 5075B8EFFD8; Thu, 31 Oct 2013 08:22:27 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zPu56r8gO9aq; Thu, 31 Oct 2013 08:22:26 +0100 (CET) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id 87F978EFFD7; Thu, 31 Oct 2013 08:22:26 +0100 (CET) Message-ID: <5272055D.5000609@bitfrost.no> Date: Thu, 31 Oct 2013 08:23:09 +0100 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130522 Thunderbird/17.0.6 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: usb/183505: [usb] Arduino Leonardo exposes three interface descriptors but no modem is attached to the first one (bInterfaceSubClass=2) References: <201310310100.r9V102Bw068142@freefall.freebsd.org> In-Reply-To: <201310310100.r9V102Bw068142@freefall.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@FreeBSD.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Oct 2013 07:21:59 -0000 On 10/31/13 02:00, Adrian Chadd wrote: > The following reply was made to PR usb/183505; it has been noted by GNATS. > > From: Adrian Chadd > To: Mike Meyer > Cc: "bug-followup@freebsd.org" > Subject: Re: usb/183505: [usb] Arduino Leonardo exposes three interface > descriptors but no modem is attached to the first one (bInterfaceSubClass=2) > Date: Wed, 30 Oct 2013 17:59:49 -0700 > > Gah, browser stupidity. > > Here's the real one: > > adrian@lucy-11i386:~/work/freebsd/head/src % svn diff sys/dev/usb > Index: sys/dev/usb/serial/umodem.c > =================================================================== > --- sys/dev/usb/serial/umodem.c (revision 257371) > +++ sys/dev/usb/serial/umodem.c (working copy) > @@ -128,6 +128,9 @@ > {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), > Index: sys/dev/usb/usb.h > =================================================================== > --- sys/dev/usb/usb.h (revision 257371) > +++ sys/dev/usb/usb.h (working copy) > @@ -441,6 +441,7 @@ > #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 > > The USB 1.1 specification states that CDC=0 is just "no command > structure over the line", versus CDC=1 which says "AT commands". > > This is enough to make the Leonardo work fine. > > Thanks to everyone else who fixed the USB protocol mis-behvaiour! > > > > -adrian This patch is fine by me. --HPS