From owner-freebsd-current@FreeBSD.ORG Sun Sep 23 19:17:11 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A995F16A421 for ; Sun, 23 Sep 2007 19:17:11 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.freebsd.org (Postfix) with ESMTP id 79E2013C47E for ; Sun, 23 Sep 2007 19:17:06 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.13.6) with ESMTP id l8NJFh9o074532; Sun, 23 Sep 2007 12:15:43 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id l8NJFaQd074531; Sun, 23 Sep 2007 12:15:36 -0700 (PDT) (envelope-from rizzo) Date: Sun, 23 Sep 2007 12:15:36 -0700 From: Luigi Rizzo To: ticso@cicely.de Message-ID: <20070923121536.C74417@xorpc.icir.org> References: <20070921103829.A43801@xorpc.icir.org> <20070922093557.GC32918@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20070922093557.GC32918@cicely12.cicely.de>; from ticso@cicely12.cicely.de on Sat, Sep 22, 2007 at 11:35:58AM +0200 Cc: current@freebsd.org Subject: Re: Why USB must be so hard to use ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Sep 2007 19:17:11 -0000 On Sat, Sep 22, 2007 at 11:35:58AM +0200, Bernd Walter wrote: ... > Since it's using an Atmel ARM. > I had to create the following umodem patch to get a pseudo serial > port for accessing the sam-ba CDC for flashing the controller: > Index: umodem.c > =================================================================== > RCS file: /home/ncvs/src/sys/dev/usb/umodem.c,v > retrieving revision 1.57 > diff -u -r1.57 umodem.c > --- umodem.c 31 Jan 2005 13:58:10 -0000 1.57 > +++ umodem.c 20 Aug 2006 17:05:34 -0000 > @@ -256,6 +260,15 @@ > id->bInterfaceProtocol == UIPROTO_CDC_AT) > ret = UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO; > > +#if 1 > + if (ret == UMATCH_NONE && > + id->bInterfaceClass == UICLASS_CDC_DATA && > + id->bInterfaceSubClass == UISUBCLASS_DATA && > + id->bInterfaceProtocol == 0x00) > + ret = UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO; > + return ret; > +#endif yes, this is similar to what i did except that i only returned UMATCH_IFACECLASS if the two other fields don't match. ... > We should really have a generic CDC tty driver, since it is used > very often for simple USB projects. i totally agree. cheers luigi