Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Apr 2005 15:04:32 +0200
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-usb@freebsd.org
Subject:   Re: Is the freebsd usb generic device driver complete?
Message-ID:  <200504301504.34475.hselasky@c2i.net>
In-Reply-To: <20050430070005.16965.qmail@web53606.mail.yahoo.com>
References:  <20050430070005.16965.qmail@web53606.mail.yahoo.com>

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



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