From owner-freebsd-usb@FreeBSD.ORG Mon Mar 7 11:16:13 2011 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0B4E10656F8 for ; Mon, 7 Mar 2011 11:16:13 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.c2i.net [212.247.154.98]) by mx1.freebsd.org (Postfix) with ESMTP id 618CC8FC08 for ; Mon, 7 Mar 2011 11:16:13 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=wd7fLirDSts22yawIUsTeMUS9lsm8Llc0grT6RvpTjU= c=1 sm=1 a=KZVTjqBoWXwA:10 a=IkcTkHD0fZMA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=1rVq95Zf6Sie6XWj1TgA:9 a=C0R3mIM-evkhIwbE3h4A:7 a=5jBNKb6Rk6fGuSgncIZTnqQEcK4A:4 a=QEXdDO2ut3YA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 96339330; Mon, 07 Mar 2011 12:16:12 +0100 From: Hans Petter Selasky To: gnixua@gmail.com Date: Mon, 7 Mar 2011 12:15:48 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-PRERELEASE; KDE/4.4.5; amd64; ; ) References: <4D74B3CB.6010902@gmail.com> <201103071144.56729.hselasky@c2i.net> <4D74BB9B.8090407@gmail.com> In-Reply-To: <4D74BB9B.8090407@gmail.com> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201103071215.48922.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: usbconfig power_off is not working correctly on FreeBSD 8.2 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2011 11:16:15 -0000 On Monday 07 March 2011 12:03:55 Gritsuk Anton wrote: > On 07.03.2011 12:44, Hans Petter Selasky wrote: > > On Monday 07 March 2011 11:30:35 Gritsuk Anton wrote: > >> I see that usbconfig is not working correctly. When i type: > >> # usbconfig -u 4 -a 3 power_off > >> > >> really usb device will detached > >> > >> But i cannot return device back when I type: > >> usbconfig -u 4 -a 3 power_on > > > > Hi, > > > > There has been some changes in this area. When an USB device is powered > > off, then you need to reset the parent hub to get it back. > > > > --HPS > > How I can reset the parent hub to get usb device back? > Hi, > When I type: > # usbconfig reset > my terminal is freeze and nothing happens. Is your keyboard on USB and you are in X? Then try: CTRL+ALT+F1, then CTRL+ALT+F9 The command you did will reset all USB devices. You should specify a particular device: usbconfig -d ugenX.Y reset I see there is a bug if trying to reset the root HUB. You can try instead: usbconfig -d ugenX.Y set_config 255 Then usbconfig -d ugenX.Y set_config 0 For the root HUB. Currently there is no easy way to find the HUB directly. One way is to find the root HUB on the same bus like your device: Device: ugen4.2: <...> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON Associated root HUB: ugen4.1: at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE You see they are both at the same bus ugen4.Y. > > > I recommend only using power_save. Then the USB stack will manage power > > saving. The power_save is done like this: usbconfig -d ugenX.Y power_save The timeout until power save triggers can be set by: sysctl hw.usb.power_timeout=30 --HPS