Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: understanding USB port, USB hub, Host controller architecture


15 Dec 2012   #1

Windows 7 Home Premium SP1 64bit
 
 
understanding USB port, USB hub, Host controller architecture

Lenovo B570 (laptop)
Windows 7 HP, x64 SP1

I am not experiencing any problems. I am just trying to figure out how things work. I am exploring the relationships of the Host Controller, Root Hub, and USB Ports. Any helpful insight would be appreciated.

This computer has four USB ports. I plugged the following devices into the USB ports:
  1. Logitech Unifying device for wireless mouse/keyboard combo
  2. Logitech dongle for wireless headset
  3. external hard drive
  4. another external hard drive
Then I explored Device Manager > Universal Serial Bus controllers in all of the following categories (two instances of each):
  • Generic USB Hub
  • Standard Enhanced PCI to USB Host Controller
  • USB Composite Device
  • USB Root Hub
The properties revealed seven (7) distinctly different port#/hub# combinations. With the four devices plugged into the USB ports, these four devices were self explanatory.

Another device was identified as my finger print reader. (which I have disabled) I am trying to figure out if the finger print reader is hard wired to either the Root Hub or the Host Controller, or if it is a virtual connection made through the registry.

The remaining two connections remain a mystery to me. I may not have known how to access the information to identify them. I do, however, have a virtual machine installed. The VM was not running at the time when I explored Device Manager. I also have a built in web cam which I did not load drivers for when I performed a clean install. Is it probable that these two devices are the ones I could not identify, or is there a more likely explanation?

While I am at it, I would like to know if my understanding of the architecture is correct. Here is the way I understand it. All physical USB ports connect to the Root Hub. I don't know if there are virtual connections to the Root Hub also. The Host Controller handles all data from the Root Hub by breaking it down in a manner similar to sending email in packets. Depending on activity, the data may be sequential from a port or a combination of packets from multiple ports which are reassembled into complete data transfers at the CPU. Is this somewhere close to how it works?


Thanks for your replies.
drpepper

My System SpecsSystem Spec
.

16 Dec 2012   #2

Win 7 Pro 64-bit 7601
 
 

It's normal for a laptop to have more USB port controllers than actual ports.

That fingerprint reader is soldered to an USB "port", and the webcams are usually soldered to an USB "port" as well. It's like they were USB devices connected to an USB port, just that the "port" they use is not soldered to the female USB plug, but directly soldered to the cable leading to that device.

Quite a few times laptops don't use all the USB ports they could, as the controllers and stuff to make the port work are physically located on the board's chipset (the component responsible of operating all ports on a motherboard, although more modern processors contain RAM and PCIe 3.0 controllers in them), and the chipset is made to fit models in all price ranges to be mass-produced in huge numbers to cut costs.
Which is why for most devices that don't need a particularly big bandwith they prefer to use USB controllers, instead of wasting much more valuable PCI express 2.0 or 3.0 lanes (3.0 usually reserved for graphics and 2.0 for wifi/bluetooth/3G modems on mini-PCIe cards and other laptop expansion card slots)

A few brave geeks did open their laptops (or netbooks) and soldered devices like say bluetooth/wifi dongles or 3G modems to some of such unused ports, and the devices got recognized and worked.

USB root hubs are the same thing as the external USB hubs, that is they share a single USB connection's bandwith over multiple USB controllers and thus ports (also USB power is shared so 500 mA per hub). Probably they do something else more technical as well as they are always there anyway, but the above is what matters.
If each port has its own hub, then each port has full USB 2 bandwith (and power, so 500 mA per port).

As for USB host controllers, each USB port has its own, regardless of the port being soldered to a female USB plug or not (again because this stuff is in the chipset). Sometimes there are some USB controller designs that decide to have more than a single controller, and have one for USB 1.1 devices (legacy) and one for USB 2.0 devices. These additional controllers for Win 7 have names like the ones you see (those are generic names for a catch-all driver).

The communication is USB device-USB controller-USB root hub-RAM-CPU, and is in packets as it's easier to find mistakes and correct them that way. There are a few different packets depending on what is the usage.
My System SpecsSystem Spec
16 Dec 2012   #3

Windows 7 Home Premium SP1 64bit
 
 

bobafetthotmail,

Thanks for the detailed reply and the helpful link. I would like to go deeper into the information I found for the USB controllers category in device manager. If you are willing to continue with explanations, I have broken my observations/questions down into manageable groups. It will help me prevent confusion when asking questions and receiving explanations.

I have plugged devices into all physical ports and taken notes on my findings in Device Manager this time. I have too many portable devices to remember the exact ones I used in the previous post. This time the devices are: dongle for wireless mouse/keyboard combo, one flash drive, and two external drives.

I have found the hub/port connections: hub#0001/port#0001, hub#0002/port#0001, hub#0003/port#0002, and hub#0004 with port #0001, #0002, #0003, #0005.

Under the generic USB hub category, hub#0001/port#0001 lists the following information:
power: the hub is self powered -- total power available 500Ma per port
power required:
USB composite device -- power required 96Ma
USB mass storage device-- power required 500Ma
USB mass storage device-- power required 500Ma
USB composite device-- power required unknown
2 ports available-- power required 0Ma

questions about this data:
  1. Is it safe to assume that there are only four hubs on this computer?
  2. The 500Ma power requirement for the mass storage devices is because of the external drives having mechanically driven disks. Is that correct?
  3. Is the USB composite device requiring 96Ma most likely to be the mouse/keyboard combo because of the necessity to pass instructions to the CPU?
  4. Is the USB composite device with an unknown power requirement most likely to be the flash drive because it is not a powered device?
  5. Can I reasonably say that this hub has a maximum capacity of 6 ports (the four devices listed + 2 ports available)?
  6. What else should I know about this data?
Thanks for your replies,
drpepper
My System SpecsSystem Spec
.


17 Dec 2012   #4

Win 7 Pro 64-bit 7601
 
 

1. yes. USB 2.0 drivers are integrated in windows 7, so all usb controllers and hubs are usually recognized and installed automatically.

2. yes. hard drives have weakly magnetized metallic disks (called platters) spinning at 5400 rpm (low-end) or 7200 rpm (high end consumer, some are at 10000 rpm) or 12000 rpm (server). This requires more power than most other USB devices. Quite a few HDDs I had required the combined power output of 2 USB2 ports to work (a total of 1000 mA or a full A), through the use of a Y usb cable.

3. yes, but the low power consumption is because the wireless dongle has a very limited range (not more than 10 meters, usually they don't work beyond 5 meters) because you won't use a keyboard or mouse so far from the screen. Everything sends instructions to the RAM, and when the CPU has a spare cycle it will have a look at it. Depending on what is the nature of the instruction, the information has higher or lower priority. Input devices usually have higher priority, but there is also the priority of the program handling that input (the program tells the CPU what to do with such input).
I assume that the keyboard and mouse are battery-powered, still they wouldn't need more power than that even if they were wired.

4. yes, flash drives do need power to work, but it's usually not that much. USB 2.0 provides 100 mA to any device, and can raise that to 500 mA if asked to do so. A flash drive is unlikely to need more than 100 mA so they cut the corners using controllers (yes, the flash drive has its own controller into it) that don't ask for more power.

5."generic usb hub" is again a generic driver name that doesn't tell much about the hardware as it is a layer on top, the windows 7's view of the matter, not what is going on at controller level. Really, it's difficult to say as you'd need the controller's and motherboard's schematics to know for sure what is going on, and neither is available (nor really necessary imho).

6.Based on what you posted I can speculate that you have 2 unshared ports (the ports connected to a single hub, so hub 1 and 2), and two USB connections whose bandwith is shared to 2 ports and 5 ports (respectively hub 3 and hub 4).
Assuming that lenovo aren't morons, the Hub 4 is there to connect the fingerprint reader and the camera to the same port, and possibly use the same bandwith for a physical USB port as well as either isn't so much bandwith-intensive anyway.

Would be interesting to know where did Hub 3's port 1 go as if there is port 2 there must be port 1 as well. I see a 6-in-1 memory card reader in the spec sheet, it's probably hooked to that port as these things are 100% on USB headers in desktop computers as well.

The same for the missing port 4 of hub 4, maybe they decided to use it for keyboard and/or touchpad of the laptop. They are slowly dropping the use of PS2 for that (legacy, even if perfectly capable for keyboards).


Another possibility is that the ports from hub 4 are actually the controllers for USB 1.1 ports for you to connect legacy devices to the four physical ports you have, that being low-bandwith (compared to USB 2) have been banded in the same hub. And the fingerprint reader is using a 1.1 port.

You can check that all the 4 ports you can plug devices into have full speed by plugging the 2 hard drives in all combinations and running a quick crystaldiskmark speed test. If speeds are more or less the same for the same device on all ports while the other is running a check as well, the ports been wired fine.
My System SpecsSystem Spec
18 Dec 2012   #5

Windows 7 Home Premium SP1 64bit
 
 

bobafetthotmail,

Thanks for the extensive information contained in your last reply. I will dive into your reply in this post, and deal with my next block of observations/questions later.

#2) The external drives are 5400 RPM, USB3. The USB3 is not of any benefit on this machine.

#3) Yes, the mouse and keyboard are battery powered. If memory serves me correctly, the range is about 30 FT, (10 M). This model has meida center features. I think the longer range is for using it in a home theater.

#6) I found the locations of these devices: (this is significant later in this post)
  • finger print reader location: hub#0004/port#0003
  • card reader location: hub#0004/port#0006
  • web cam location: 0000.001a.0000.001.005.000.000.000.000 -- This is meaningless to me.
The mouse (touchpad) and keyboard are PS2.

I ran CrystalDiskMark on all possible combinations for two external drives. Phew! That come to 24 individual tests! I had Task Manager running "on top" just out of curiosity during the tests.To my surprise I never saw CPU usage above 3% or memory usage above 1.29GB. This must be a really light weight utility!

I used the test data default (random) and test runs default (5). However I chose to use 100MB test size to come the closest to simulating the transfer speed I view when making a backup to an external drive. (200-300MB/s) I tested all types.

The random write 4K QD32 was the only test type where I saw any significant deviation in speeds across all 24 tests. There were six connection combinations which were about half the speed of the others in this test type.

Three of the physical USB ports are connected to hub#0003. The other is connected to hub#0004. As stated above, the finger print reader and card reader are connected to hub#0004. This means that each physical USB port shares its hub with two other physical USB connections. Here is where I am a little shy in the understanding department. Is this significant? Is it possible that some software drivers (like one of the Logitech ones I found) are using available resources for any of the hubs?

I am including a txt attachment of the test results for your review. I would appreciate any additional insight you can provide.

Thanks,
drpepper


Attached Files
File Type: txt crystaldiskmark.txt (22.6 KB, 7 views)
My System SpecsSystem Spec
Reply

 understanding USB port, USB hub, Host controller architecture




Thread Tools



Similar help and support threads for2: understanding USB port, USB hub, Host controller architecture
Thread Forum
USB 3.0 Host Controller missing Hardware & Devices
USB port does not work in host OS but works in VM with 1 device Virtualization
Ricoh SD Host Controller Drivers
USB 3.0 host controller not found Hardware & Devices
USB host controller problems Hardware & Devices
USB Host Controller problem Drivers
cmd could not connect to the host on port 23 Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 10:59 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33