Is the freebsd usb generic device driver complete?
Hans Petter Selasky
hselasky at c2i.net
Sat Apr 30 06:04:00 PDT 2005
On Saturday 30 April 2005 09:00, paradox wrote:
> sorry, i wrote the last mail in linux,can't check the
> source codes,so i made some mistakes.
>
> The ival is set to USBD_DEFAULT_INTERVAL, whose value
> should be -1, In uhci_open function, it will be convert
> to pipe->endpoint>edesc->binterval automatically.
>
> My machine are uhci interface, with the usb key
> linked to the usb bus directly.In linux , the driver
> first set the address to 00 02, then get descriptors,
> at last,it set the configuration to 0x 00 01, then
> send 5 bytes to the usb ckey and got a ACK response.
> In freebsd, it first set the address to 00 02 also,
> but it insert a GET_STATUS packet in thosr
> GET_DESCRIPTOR packet and got 0x 00 00 resopnse.It
> also set the configuration to 0x 00 01(two times, one
> is when I load usb.ko,another time is when I load
> ugen.ko.when I open the nodes. it send CLEAR_FEATURE
> packet twice, then send a OUT packet just like in the
> linux environment, but got a NAK response.
>
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
More information about the freebsd-usb
mailing list