Ever looked at the list of your connected USB devices? It probably looks something like this:
I can count four USB controllers and four root hubs. A quick guess of one hub per controller and four ports per hub means I should have sixteen USB ports on my computer. Unfortunately not. I have only two ports on the back of my laptop (Inspiron 8600).
Both of these ports can operate at high-speed, which means they belong to the USB 2.0 Enhanced Host Controller rather than any of the others, so why bother wasting space on the motherboard for the other three?
Potentially one controller belongs to the USB-sized hole in one side of the case, but since there is no actual port there I can not test whether it also belongs to the USB 2.0 controller.
Time to go to the tools. USB View is a 'free' tool from Microsoft, in the sense that to get it you need to download and install the Windows Driver Development Kit and build the example yourself. The first link is my copy which I build myself for Windows XP. (Apparently it may not work correctly on older versions of Windows, just as a version built for Windows XP original (ie. no service packs) or earlier won't work properly on WinXP SP2.)
Running it, the first thing to notice is that my guess of four ports per root hub was wrong.
The three USB 1.1 controllers have two ports each, while the USB 2.0 controller (highlighted) has six. (As you can see, I've disconnected everything so it's just the controllers and their hubs.) It's time to test the theory about which controller has which port.
First I connect a USB Mass Storage device to what I'll call USB port 1 (the top one):
No surprises there. Looking at the speed value on the right, we can see that it is connected at high speed. (We can also see that the device manufacturer hasn't bothered to get their own vendor ID, since they've just used Cypress Semiconductor's, who makes the USB controller.)
Moving the device to USB port 2 (the bottom one):
Interestingly, it's connected to the third port of the root hub. So perhaps the potential USB port which isn't attached to this motherboard goes to the second port? Unfortunately, I have no way of testing this theory.
So ports 1 and 3 of the USB 2.0 controller are connected to the two ports on the back of the laptop. I am assuming that the missing port also connects to this controller. So why are there three others?
The answer comes from the specifications for the Intel 82801DB/DBM controller, section 5.17.8 on page 202.
The EHC shares the six USB ports with three UHCI Host controllers in the ICH4. The USB UHCI controller at D29:F0 shares ports 0 and 1; the USB UHCI controller at D29:F1 shares ports 2 and 3; and the USB UHCI controller at D29:F2 shares ports 4 and 5 with the EHCI controller. There is very little interaction between the USB EHCI and the USB UHCI controllers other than the muxing control which is provided as part of the EHCI controller.
So there are actually a total of six ports available, each of which is capable of acting at any speed. When a high speed device is connected, the USB 2.0 controller (called USB EHCI in the Intel document) takes responsibility. Otherwise, one of the other controllers does. This is presumably to lessen the workload on the high speed controller.
Time to test this out. USB View says:
So that's it. The keyboard has actually connected to a different controller. If we unplug both devices and reconnect the keyboard only, we can see that it stays in the same place.
So that confirms that the controllers actually share the ports. Which leaves the minor problem of where the other plugs are...
The Intel documentation indicates that there are six actual ports exposed by the chipset. On the laptop, there are two on the back and one on the side (which doesn't really exist...) which means three are hidden. One of these, I'm told, is used for versions of the laptop that include a BlueTooth module. Since I don't have this module, I can't be sure which port it is, but through much plugging and unplugging of devices, I've been able to label the rest of the ports.