a problem about ugen.c
paradox
algorist2000 at yahoo.com
Tue May 10 23:20:50 PDT 2005
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 at 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/
More information about the freebsd-usb
mailing list