Re: USB power accounting at root hub level

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le Tue, 26 Jul 2011 13:03:16 +0300,
Felipe Balbi <balbi@xxxxxx> a écrit :

> > These requirements are identical in consequence.
> > So you have a budget per hub of 700mA, which translates
> > into 500mA per port (limit from the spec)
> > But as soon as you configure a device to actually use
> > 500mA the limit per port would have to drop to 200mA, correct?
> 
> from what I understood, 700mA is for the whole thing, so if he
> configures a 500mA on port A, port B only has 200mA to spare. If he
> configures a 400mA on port B, port A has only 300mA to spare. Thomas ?

Exact.

What Olivier proposes has the same final effect but is implemented
differently: he proposes to dynamically adjust the allowed per-port
limit as devices gets connected/disconnected.

For things to be really clear, I think it'd be better to distinguish :

 * The per-hub maximum current available
 * The per-port maximum current available

By default, the per-port maximum current available is 500 mA and the
per-hub maximum current available is nb_ports * 500 mA. In my case
however, the per-port maximum current available is 500 mA but the
per-hub maximum current is 700 mA.

Then, when a device gets connected, both the following conditions are
checked :

 * Does the device requests an amount of current that exceeds the
   per-port maximum current ?
 * Does the device requests an amount of current that exceeds the
   remaining amount of power available at the level of the hub,
   considering all devices already connected to this hub ?

If one of those conditions are true, then the device is rejected.

Would such a thing make sense ?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux