Chapter 8
216
more about how to implement low-level communications, one source of infor-
mation is the source code and other documentation from the Linux USB
Project.
*QUV%QPVTQNNGT6[RGU
To access low- and full-speed devices, a USB 1.x or USB 2.0 host can use a con-
troller that conforms to the Open Host Controller Interface (OHCI) standard
or the Universal Host Controller Interface (UHCI) standard. To access
high-speed devices, a USB 2.0 host uses a host controller that conforms to the
Enhanced Host Controller Interface (EHCI) standard. USB 3.0 hosts use a sin-
gle Extensible Host Controller Interface (xHCI) controller for all speeds. The
USB-IF’s website has links to the specifications.
For information about which host-controller types are in a PC, in Windows
Device Manager, look under Universal Serial Bus controllers. To view a driver’s
name, right-click a host controller’s entry and select Properties > Driver >
Driver Details. One of the drivers listed should have ohci, uhci, or ehci in the
name. Chapter 9 has more about the Device Manager.
1*%+CPF7*%+&KHHGTGPEGU
OHCI and UHCI controllers both provide a way for the low- and full-speed
USB hardware to communicate with higher-level drivers, but each takes a dif-
ferent approach. UHCI places more of the communications burden on software
and thus can use simpler, cheaper hardware. OHCI places more of the burden
on the hardware and allows simpler software control. UHCI was developed by
Intel, and OHCI was developed by Compaq, Microsoft, and National Semi-
conductor. Motherboards tend to have UHCI controllers, and expansion cards
tend to have OHCI controllers.
The differences between host controllers should be transparent to driver devel-
opers and application programmers. Both controller types comply fully with
the USB specification. Their performance can differ, however. Developers
shouldn’t assume a device works fine based on tests with one host-controller
type.
An OHCI controller can schedule more than one stage of a control transfer in a
single frame, while a UHCI controller always schedules each stage in a different
frame. For bulk endpoints with a maximum packet size less than 64 bytes, a
UHCI driver attempts no more than one transaction per frame, while an
OHCI driver may schedule additional transactions in a frame. An OHCI con-