Re: USB power accounting at root hub level

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

 



Am Dienstag, 26. Juli 2011, 08:46:07 schrieb Thomas Petazzoni:
> Hello,
> 
> Thanks again for the quick feedback.
> 
> Le Mon, 25 Jul 2011 15:08:53 -0400 (EDT),
> Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> a écrit :

> > There's no contradiction.  If 175 mA total are available, then one way
> > to apportion it is to plug in a single device requiring 175 mA.  In
> > other words, there really is up to 175 mA available for each port.
> 
> Hum, I'm sorry, but I still see a contradiction :
> 
>  * On one side, there is a computation that assumes that hdev->bus_mA
>    is a *per-port* current limit (and this computation is used to
>    reject new USB configurations from connecting) ;
> 
>  * On another side, there is a computation that assumes that
>    hdev->bus_mA is a *global hub* current limit (and this computation
>    is used to print a warning in the kernel messages).
> 
> If I set a global current limit of 175 mA, then two devices of 100 mA
> shouldn't be allowed to connect.

I am afraid this is a true problem. We need to make the computation of
the available power dynamic. The computation of hub->mA_per_port
once is insufficient, as we cannot say that a limit valid for any port is valid
for every port forever.

The logical place for this dynamic adjustment would be usb_set_configuration()

	Regards
		Oliver
- - - 
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) 
Maxfeldstraße 5                         
90409 Nürnberg 
Germany 
- - - 
--
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