From owner-freebsd-current@FreeBSD.ORG Mon May 18 17:14:46 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 936D0106564A for ; Mon, 18 May 2009 17:14:46 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.swip.net [212.247.154.161]) by mx1.freebsd.org (Postfix) with ESMTP id EE3D38FC12 for ; Mon, 18 May 2009 17:14:45 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=LqFJ_cFnVGsA:10 a=twbyJQYelQEA:10 a=MXw7gxVQKqGXY79tIT8aFQ==:17 a=qHjUS2GN3Qx09gxOFq0A:9 a=FSr0n8mdybiS0XPcankA:7 a=S5x0yqKE4xTKpaudH7PzwwcVfhsA:4 Received: from [62.113.132.61] (account mc467741@c2i.net HELO laptop) by mailfe06.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1244305099; Mon, 18 May 2009 19:14:44 +0200 From: Hans Petter Selasky To: Alexey Shuvaev Date: Mon, 18 May 2009 19:17:14 +0200 User-Agent: KMail/1.9.7 References: <747dc8f30905180627h25c83dbt8b5fd8527bad6f15@mail.gmail.com> <200905181546.02302.hselasky@c2i.net> <20090518165838.GA8670@wep4035.physik.uni-wuerzburg.de> In-Reply-To: <20090518165838.GA8670@wep4035.physik.uni-wuerzburg.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905181917.16039.hselasky@c2i.net> Cc: freebsd-current@freebsd.org Subject: Re: Setting max 500 mA (Was Re: [new-usb] - USB_ERR_NO_POWER on keyboard hub) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2009 17:14:46 -0000 On Monday 18 May 2009, Alexey Shuvaev wrote: > On Mon, May 18, 2009 at 03:46:01PM +0200, Hans Petter Selasky wrote: > > On Monday 18 May 2009, Renato Botelho wrote: > > > I have a Sun USB Type 7 keyboard, and this keyboard has an USB hub > > > with 3 ports on it. I'm using one of those 3 ports to plug the mouse > > > and it's working fine. > > > > > > uhub5: 4 ports with 3 removable, bus powered > > > ugen0.3: at usbus0 > > > ums0: on > > > usbus0 ums0: 3 buttons and [XYZ] coordinates ID=0 > > > ugen0.4: at usbus0 > > > ukbd0: > > 2.00/1.04, addr 4> on usbus0 > > > kbd2 at ukbd0 > > > > > > When I tried to plug a pen drive on anothe one, I got this: > > > > > > usb2_set_config_index:531: power exceeded 500 > 100 > > > usb2_set_config_index:531: power exceeded 500 > 100 > > > usb2_alloc_device:1755: Failure selecting configuration index 0: > > > USB_ERR_NO_POWER, port 2, addr 5 (ignored) > > > ugen0.5: at usbus0 > > > pid 3705 (hald-probe-usb2-dev), uid 0: exited on signal 11 > > > ugen0.5: at usbus0 (disconnected) > > > > > > usb2_set_config_index:531: power exceeded 500 > 100 > > > usb2_set_config_index:531: power exceeded 500 > 100 > > > usb2_alloc_device:1755: Failure selecting configuration index 0: > > > USB_ERR_NO_POWER, port 1, addr 5 (ignored) > > > ugen0.5: at usbus0 > > > pid 3886 (hald-probe-usb2-dev), uid 0: exited on signal 11 > > > ugen0.5: at usbus0 (disconnected) > > > > > > I'm using FreeBSD 8.0-current r192140. > > > > > > Let me know if there is more information i need to provide. > > > > > > Thanks > > > > Hi, > > > > Your Keyboard HUB technically does not allow current consumption above > > 100mA per port. Your memstick reports it needs 500mA. Probably you can > > hack around it, but then your hardware might break ... > > Hello! > > Somewhat not directly related. > Is it possible (in a not too intrusive way) to allow max 500mA current > for a device on a root HUB? This is to allow fast charging of mini-usb > connected handy. > > (If something dies, I knew what I was doing :) Hi, There is a quirk to do the opposite of what you want, to force the device BUS-powered. But not to force it self powered. Look in: /sys/dev/usb/usb_device.c And the set_config_index function. --HPS