Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 May 2005 23:20:48 -0700 (PDT)
From:      paradox <algorist2000@yahoo.com>
To:        freebsd-usb@FreeBSD.org
Subject:   a problem about ugen.c
Message-ID:  <20050511062048.37521.qmail@web53602.mail.yahoo.com>
In-Reply-To: 6667

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



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