Quoting Brad Hards <[EMAIL PROTECTED]>:

> > If you have a bus-powered hub then you will see something like this:
> >
> > T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxCh= 7
> > D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> > P:  Vendor=0451 ProdID=1446 Rev= 1.00
> > C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA

> This may be should be 500mA? Otherwise how can the downstream ports provide 
> 100mA each? Not that firmware designers are big on descriptor accuracy 
> anyway... 100mA would make sense for a self powered hub.

This particular hub (D-Link DSB-H7) is self-powered indeed, I was too lazy
to plug the bus-powered hub in, that's why I said "something like this"
:-) My intent was only to show a device that claims some power from the
bus.

However bus-powered hub does not need to show 500 mA. Here is an example
of a *real* bus-powered hub (Atmel AT43301). This chip can not be even
programmed to change the reported value (and it does not support EEPROM):

T:  Bus=01 Lev=02 Prnt=02 Port=06 Cnt=02 Dev#= 46 Spd=12  MxCh= 4
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=03eb ProdID=3301 Rev= 3.00
S:  Product=Standard USB Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 64mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=255ms

This hub reports only 64 mA needed for itself. It can be either
bus-powered or self-powered, but is wired to bus-powered mode only.

Generally, the hub can claim as little as 0 mA (in fully self-powered
mode), or as much as 500 mA for a maxed out bus-powered hub, or something
in between if used in a compound device where the developer knows the
power budget within the device.

Here is another bus-powered hub (Interex, based on a TI chip, apparently
the same chip that D-Link hubs use):

T:  Bus=01 Lev=02 Prnt=02 Port=06 Cnt=02 Dev#= 54 Spd=12  MxCh= 4
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0451 ProdID=1446 Rev= 1.00
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=255ms

This hub is for sure bus-powered because I have it right here, in front of
me, it correctly says MxCh=4 (the other hub has 7 ports, see above) and it
does not have any cable connected except USB.

So, basically, any hub can legitimately claim any power from the upstream
port, and it does not need to depend on pretty much anything. In some
cases these figures are misleading, as it seems. Windows people probably
ignore all that and count ports instead, poll the device on the port and
use that number. It can't possibly work otherwise.

Thanks,
Dmitri

-- 
The memory management on the PowerPC can be used to frighten small children.
  (Linus Torvalds.)

Attachment: msg02877/pgp00000.pgp
Description: PGP signature

Reply via email to