From owner-freebsd-usb@FreeBSD.ORG Thu Oct 31 14:12:33 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 9DE36CB7 for ; Thu, 31 Oct 2013 14:12:33 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x22c.google.com (mail-qc0-x22c.google.com [IPv6:2607:f8b0:400d:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 60C372143 for ; Thu, 31 Oct 2013 14:12:33 +0000 (UTC) Received: by mail-qc0-f172.google.com with SMTP id c9so1674900qcz.31 for ; Thu, 31 Oct 2013 07:12:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=L7t8Cvp2FQx/8D3uf2772N5GkNQ2uQvG9nGaeeBS0rY=; b=WMwipZHpYA7BufPuxLGPuw0qLioDdwb+k/UAb7+veZn1K5YVWaMCC1yHqJrcanVs4m GGL1moX1s1Tyniy1VlIEIzyAHP+ZhQAUZi5m54mYOQFpmPMTmI1ErrOrkFHXG7ZeuUJ+ Ta0MqW2K+l+r4LeTXfSvOYS7yPc7Jv2oYOoTyWMj099DNO3J6wMoovrUb1P6kd6/OOzV lgL/WnAvu9KFXJwZ+PeIODbxxoxnAD1Pft3ctGR/0HTRHgHCivbbpO/m3Pf2ejIBDfu6 xZtnKUvbX3PZTOiwwezJ7VOHqQpT476wiu5y4ZD/LP6ThuObhnlXxUc8+ttWDz2GOF8F Dc0w== MIME-Version: 1.0 X-Received: by 10.224.161.84 with SMTP id q20mr5307352qax.90.1383228752324; Thu, 31 Oct 2013 07:12:32 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.207.66 with HTTP; Thu, 31 Oct 2013 07:12:32 -0700 (PDT) In-Reply-To: <5272055D.5000609@bitfrost.no> References: <201310310100.r9V102Bw068142@freefall.freebsd.org> <5272055D.5000609@bitfrost.no> Date: Thu, 31 Oct 2013 07:12:32 -0700 X-Google-Sender-Auth: hczzvErQTSXUYMxUwKsIPSUXwyw Message-ID: Subject: Re: usb/183505: [usb] Arduino Leonardo exposes three interface descriptors but no modem is attached to the first one (bInterfaceSubClass=2) From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 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 14:12:33 -0000 Cool, committed! I'll get it MFCed to 10 soon. Thanks! -a On 31 October 2013 00:23, Hans Petter Selasky wrote: > 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 >