From owner-freebsd-usb@FreeBSD.ORG Sat Apr 30 13:04:00 2005 Return-Path: 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 298A616A4D1 for ; Sat, 30 Apr 2005 13:04:00 +0000 (GMT) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id EAAB443D4C for ; Sat, 30 Apr 2005 13:03:58 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from mp-217-233-64.daxnet.no ([193.217.233.64] verified) by mailfe03.swip.net (CommuniGate Pro SMTP 4.3c5) with ESMTP id 157548441; Sat, 30 Apr 2005 15:03:57 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sat, 30 Apr 2005 15:04:32 +0200 User-Agent: KMail/1.7 References: <20050430070005.16965.qmail@web53606.mail.yahoo.com> In-Reply-To: <20050430070005.16965.qmail@web53606.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504301504.34475.hselasky@c2i.net> Subject: Re: Is the freebsd usb generic device driver complete? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hselasky@c2i.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Apr 2005 13:04:00 -0000 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