From owner-freebsd-usb@FreeBSD.ORG  Wed May 11 06:20:50 2005
Return-Path: <owner-freebsd-usb@FreeBSD.ORG>
Delivered-To: freebsd-usb@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0A4C816A4CE
	for <freebsd-usb@FreeBSD.org>; Wed, 11 May 2005 06:20:50 +0000 (GMT)
Received: from web53602.mail.yahoo.com (web53602.mail.yahoo.com
	[206.190.37.35])	by mx1.FreeBSD.org (Postfix) with SMTP id 822C243D31
	for <freebsd-usb@FreeBSD.org>; Wed, 11 May 2005 06:20:49 +0000 (GMT)
	(envelope-from algorist2000@yahoo.com)
Received: (qmail 37523 invoked by uid 60001); 11 May 2005 06:20:48 -0000
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
	s=s1024; d=yahoo.com;
	b=0T/GWts/bETdcE+jo0oT2rtrr4fpU4UYIfLo68tUGNTPDvYZPZTufnL/pPnWCI/arY+CuGArgSQHpU/pZKrJQp+SDSOs97G+Ghaw1VR36GvPoh9Wl/F2nwcb4JKuNxIDbPr/ayIAPMO5VOvSYWedgS6YId/kaa8RdfPPnL1ibuw=
	;
Message-ID: <20050511062048.37521.qmail@web53602.mail.yahoo.com>
Received: from [61.48.121.93] by web53602.mail.yahoo.com via HTTP;
	Tue, 10 May 2005 23:20:48 PDT
Date: Tue, 10 May 2005 23:20:48 -0700 (PDT)
From: paradox <algorist2000@yahoo.com>
To: freebsd-usb@FreeBSD.org
In-Reply-To: 6667
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: a problem about ugen.c
X-BeenThere: freebsd-usb@freebsd.org
X-Mailman-Version: 2.1.1
Precedence: list
List-Id: FreeBSD support for USB <freebsd-usb.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-usb>,
	<mailto:freebsd-usb-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-usb>
List-Post: <mailto:freebsd-usb@freebsd.org>
List-Help: <mailto:freebsd-usb-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-usb>,
	<mailto:freebsd-usb-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 11 May 2005 06:20:50 -0000

Thanks,all problems are solved.

The usb key device has two hardware bugs, one is the
CLEAR_FEATURE packet problem just like you said, the
other is an error in the toggle bit changing.

  after I change the usb-subr.c, I can use ugen.ko to
read and write the device directly.

but when I read data from the device(low speed,
interrupt pipe),the data length I read must be less
than the max packet size,or some data will be lost.
The read command only read data in one interval. but I
thought the standard read function should read the
data  till all the data has been read or we got an
incomplete packet. Am I right?



--- Hans Petter Selasky <hselasky@c2i.net> wrote:
> On Saturday 30 April 2005 09:00, paradox wrote:
 
> It might be the CLEAR_FEATURE or clear stall packet
> that does it. Some devices 
> will only work if clear stall is issued as a part of
> a reset sequence. This 
> has been discussed before on this list.
> 
> In the file "/sys/dev/usb/usb_subr.c" in the
> function "usbd_setup_pipe" could 
> you change:
> 
> err = usbd_clear_endpoint_stall(p);
> 
> into 
> 
> err = 0; /* usbd_clear_endpoint_stall(p); */
> 
> Then recompile the USB module: 
> "make -C/sys/modules/usb depend all install clean"
> 
> Reboot and see if there is any change.
> 
> Yours
>   HPS
> 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/