<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Chapter 6. Host Controller APIs</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="The Linux-USB Host Side API" /><link rel="up" href="index.html" title="The Linux-USB Host Side API" /><link rel="prev" href="re109.html" title="usb_queue_reset_device" /><link rel="next" href="re110.html" title="usb_calc_bus_time" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 6. Host Controller APIs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re109.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="re110.html">Next</a></td></tr></table><hr /></div><div class="chapter" title="Chapter 6. Host Controller APIs"><div class="titlepage"><div><div><h2 class="title"><a id="hcd"></a>Chapter 6. Host Controller APIs</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="refentrytitle"><a href="re110.html"><span>usb_calc_bus_time</span></a></span><span class="refpurpose"> — approximate periodic transaction time in nanoseconds </span></dt><dt><span class="refentrytitle"><a href="re111.html"><span>usb_hcd_link_urb_to_ep</span></a></span><span class="refpurpose"> — add an URB to its endpoint queue </span></dt><dt><span class="refentrytitle"><a href="re112.html"><span>usb_hcd_check_unlink_urb</span></a></span><span class="refpurpose"> — check whether an URB may be unlinked </span></dt><dt><span class="refentrytitle"><a href="re113.html"><span>usb_hcd_unlink_urb_from_ep</span></a></span><span class="refpurpose"> — remove an URB from its endpoint queue </span></dt><dt><span class="refentrytitle"><a href="re114.html"><span>usb_hcd_giveback_urb</span></a></span><span class="refpurpose"> — return URB from HCD to device driver </span></dt><dt><span class="refentrytitle"><a href="re115.html"><span>usb_hcd_resume_root_hub</span></a></span><span class="refpurpose"> — called by HCD to resume its root hub </span></dt><dt><span class="refentrytitle"><a href="re116.html"><span>usb_bus_start_enum</span></a></span><span class="refpurpose"> — start immediate enumeration (for OTG) </span></dt><dt><span class="refentrytitle"><a href="re117.html"><span>usb_hc_died</span></a></span><span class="refpurpose"> — report abnormal shutdown of a host controller (bus glue) </span></dt><dt><span class="refentrytitle"><a href="re118.html"><span>usb_create_hcd</span></a></span><span class="refpurpose"> — create and initialize an HCD structure </span></dt><dt><span class="refentrytitle"><a href="re119.html"><span>usb_add_hcd</span></a></span><span class="refpurpose"> — finish generic HCD structure initialization and register </span></dt><dt><span class="refentrytitle"><a href="re120.html"><span>usb_remove_hcd</span></a></span><span class="refpurpose"> — shutdown processing for generic HCDs </span></dt><dt><span class="refentrytitle"><a href="re121.html"><span>usb_hcd_pci_probe</span></a></span><span class="refpurpose"> — initialize PCI-based HCDs </span></dt><dt><span class="refentrytitle"><a href="re122.html"><span>usb_hcd_pci_remove</span></a></span><span class="refpurpose"> — shutdown processing for PCI-based HCDs </span></dt><dt><span class="refentrytitle"><a href="re123.html"><span>usb_hcd_pci_shutdown</span></a></span><span class="refpurpose"> — shutdown host controller </span></dt><dt><span class="refentrytitle"><a href="re124.html"><span>hcd_buffer_create</span></a></span><span class="refpurpose"> — initialize buffer pools </span></dt><dt><span class="refentrytitle"><a href="re125.html"><span>hcd_buffer_destroy</span></a></span><span class="refpurpose"> — deallocate buffer pools </span></dt></dl></div><p>These APIs are only for use by host controller drivers, most of which implement standard register interfaces such as EHCI, OHCI, or UHCI. UHCI was one of the first interfaces, designed by Intel and also used by VIA; it doesn't do much in hardware. OHCI was designed later, to have the hardware do more work (bigger transfers, tracking protocol state, and so on). EHCI was designed with USB 2.0; its design has features that resemble OHCI (hardware does much more work) as well as UHCI (some parts of ISO support, TD list processing). </p><p>There are host controllers other than the "big three", although most PCI based controllers (and a few non-PCI based ones) use one of those interfaces. Not all host controllers use DMA; some use PIO, and there is also a simulator. </p><p>The same basic APIs are available to drivers for all those controllers. For historical reasons they are in two layers: <span class="structname">struct usb_bus</span> is a rather thin layer that became available in the 2.2 kernels, while <span class="structname">struct usb_hcd</span> is a more featureful layer (available in later 2.4 kernels and in 2.5) that lets HCDs share common code, to shrink driver size and significantly reduce hcd-specific behaviors. </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re109.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="re110.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>usb_queue_reset_device</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span>usb_calc_bus_time</span></td></tr></table></div></body></html>