From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 15:11:19 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26383106566C; Tue, 6 Jan 2009 15:11:19 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id C0A578FC25; Tue, 6 Jan 2009 15:11:17 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=K7R4C4L6l2QA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=OrbuaqbLBcVSlk_17agA:9 a=VVhOyabtMYaBlzekCKXHqET_pOgA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1175435757; Tue, 06 Jan 2009 16:11:15 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 16:13:32 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061215.37947.hselasky@c2i.net> <20090106180123.d032657d.stas@FreeBSD.org> In-Reply-To: <20090106180123.d032657d.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061613.33687.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 15:11:19 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 12:15:37 +0100 > > Hans Petter Selasky mentioned: > > As long as your device shows up like "ugen0.2" it is detected properly > > and will function. Check with "usbconfig". > > > > Suggestions: > > > > usbconfig -u 0 -a 2 reset > > usbconfig -u 0 -a 2 dump_device_desc > > This doesn't change anything, the device fails to attach. > > > The failures indicate that the firmware on your USB device is not > > reponding correctly at the time the set address command is being sent to > > the device. > > Do you have some ideas how this situation could be handled in the new > stack? > > > As you can see the new USB stack will try to re-enumerate the device one > > time. > > > > Have you loaded the correct driver for your serial device? > > > > kldload usb2_serial_bsa > > Yes, this module is loaded and I can see it enters the probe routine. But > as the configuration index doesn't match what the driver expects it fails > to probe. Driver checks for configuration idx 1, but I see this device on > idx 0. ugen0.2: at usbus0, > cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON > > The old stack didn't checked for specific configuration index, but tryed to > select the appropriate one in the attach routine. > /* Move the device into the configured state. */ > err = usbd_set_config_index(dev, UBSA_CONFIG_INDEX, 1); > > What is the reason you have reworked this? Should this be changed to be > handled like in the old driver? The new is that the driver is not allowed to set the config index by itself. Try: usbconfig -u 0 -a 2 set_config 1 You can for example add a quirk for this, see "usbconfig -h | grep -i quirk". I know this is not so easy, but if you can make a general rule for when selecting another configuration, I will add it. Could you dump me the descriptors of your USB device? usbconfig -u 0 -a 2 dump_curr_config_desc dump_device_desc --HPS