Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Sep 2007 12:15:36 -0700
From:      Luigi Rizzo <rizzo@icir.org>
To:        ticso@cicely.de
Cc:        current@freebsd.org
Subject:   Re: Why USB must be so hard to use ?
Message-ID:  <20070923121536.C74417@xorpc.icir.org>
In-Reply-To: <20070922093557.GC32918@cicely12.cicely.de>; from ticso@cicely12.cicely.de on Sat, Sep 22, 2007 at 11:35:58AM %2B0200
References:  <20070921103829.A43801@xorpc.icir.org> <20070922093557.GC32918@cicely12.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070923121536.C74417>