Re: [PATCH 2/2] usb/core: consider link speed while looking at bMaxPower

2012-12-06 Thread Sergei Shtylyov
Hello. On 05-12-2012 22:56, Sebastian Andrzej Siewior wrote: going through the tree I saw most people set it to something around 200 (if at all). There are a few omap/musb boards setting it to 500. The interresting part is davinci of course. So there is comment that says |"irlml6401 switches ov

Re: [PATCH 2/2] usb/core: consider link speed while looking at bMaxPower

2012-12-05 Thread Alan Stern
On Wed, 5 Dec 2012, Sebastian Andrzej Siewior wrote: > On Mon, Dec 03, 2012 at 04:28:38PM -0500, Alan Stern wrote: > > On Mon, 3 Dec 2012, Sarah Sharp wrote: > > > This code in hcd.c:usb_add_hcd needs to change: > > > > > > /* starting here, usbcore will pay attention to this root hub */

Re: [PATCH 2/2] usb/core: consider link speed while looking at bMaxPower

2012-12-05 Thread Sebastian Andrzej Siewior
On Mon, Dec 03, 2012 at 04:28:38PM -0500, Alan Stern wrote: > On Mon, 3 Dec 2012, Sarah Sharp wrote: > > This code in hcd.c:usb_add_hcd needs to change: > > > > /* starting here, usbcore will pay attention to this root hub */ > > rhdev->bus_mA = min(500u, hcd->power_budget); > > I

Re: [PATCH 2/2] usb/core: consider link speed while looking at bMaxPower

2012-12-03 Thread Alan Stern
On Mon, 3 Dec 2012, Sarah Sharp wrote: > On Mon, Dec 03, 2012 at 08:07:06PM +0100, Sebastian Andrzej Siewior wrote: > > The USB 2.0 specification says that bMaxPower is the maximum power > > consumption expressed in 2 mA units and the USB 3.0 specification says > > that it is expressed in 8 mA uni

Re: [PATCH 2/2] usb/core: consider link speed while looking at bMaxPower

2012-12-03 Thread Alan Stern
On Mon, 3 Dec 2012, Sebastian Andrzej Siewior wrote: > The USB 2.0 specification says that bMaxPower is the maximum power > consumption expressed in 2 mA units and the USB 3.0 specification says > that it is expressed in 8 mA units. > This patch adds a helper function usb_get_max_power() which com

Re: [PATCH 2/2] usb/core: consider link speed while looking at bMaxPower

2012-12-03 Thread Sarah Sharp
On Mon, Dec 03, 2012 at 08:07:06PM +0100, Sebastian Andrzej Siewior wrote: > The USB 2.0 specification says that bMaxPower is the maximum power > consumption expressed in 2 mA units and the USB 3.0 specification says > that it is expressed in 8 mA units. Thanks for catching this, Sebastian! Howev

[PATCH 2/2] usb/core: consider link speed while looking at bMaxPower

2012-12-03 Thread Sebastian Andrzej Siewior
The USB 2.0 specification says that bMaxPower is the maximum power consumption expressed in 2 mA units and the USB 3.0 specification says that it is expressed in 8 mA units. This patch adds a helper function usb_get_max_power() which computes the value based on config & usb_device's speed value. Th