1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Chapter&#160;6.&#160;Host Controller APIs</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><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="API-usb-hub-find-child.html" title="usb_hub_find_child"><link rel="next" href="API-usb-calc-bus-time.html" title="usb_calc_bus_time"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&#160;6.&#160;Host Controller APIs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-usb-hub-find-child.html">Prev</a>&#160;</td><th width="60%" align="center">&#160;</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-usb-calc-bus-time.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="hcd"></a>Chapter&#160;6.&#160;Host Controller APIs</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="refentrytitle"><a href="API-usb-calc-bus-time.html"><span class="phrase">usb_calc_bus_time</span></a></span><span class="refpurpose"> &#8212; 
2  approximate periodic transaction time in nanoseconds
3 </span></dt><dt><span class="refentrytitle"><a href="API-usb-hcd-link-urb-to-ep.html"><span class="phrase">usb_hcd_link_urb_to_ep</span></a></span><span class="refpurpose"> &#8212; 
4     add an URB to its endpoint queue
5 </span></dt><dt><span class="refentrytitle"><a href="API-usb-hcd-check-unlink-urb.html"><span class="phrase">usb_hcd_check_unlink_urb</span></a></span><span class="refpurpose"> &#8212; 
6     check whether an URB may be unlinked
7 </span></dt><dt><span class="refentrytitle"><a href="API-usb-hcd-unlink-urb-from-ep.html"><span class="phrase">usb_hcd_unlink_urb_from_ep</span></a></span><span class="refpurpose"> &#8212; 
8     remove an URB from its endpoint queue
9 </span></dt><dt><span class="refentrytitle"><a href="API-usb-hcd-giveback-urb.html"><span class="phrase">usb_hcd_giveback_urb</span></a></span><span class="refpurpose"> &#8212; 
10     return URB from HCD to device driver
11 </span></dt><dt><span class="refentrytitle"><a href="API-usb-alloc-streams.html"><span class="phrase">usb_alloc_streams</span></a></span><span class="refpurpose"> &#8212; 
12     allocate bulk endpoint stream IDs.
13 </span></dt><dt><span class="refentrytitle"><a href="API-usb-free-streams.html"><span class="phrase">usb_free_streams</span></a></span><span class="refpurpose"> &#8212; 
14     free bulk endpoint stream IDs.
15 </span></dt><dt><span class="refentrytitle"><a href="API-usb-hcd-resume-root-hub.html"><span class="phrase">usb_hcd_resume_root_hub</span></a></span><span class="refpurpose"> &#8212; 
16     called by HCD to resume its root hub
17 </span></dt><dt><span class="refentrytitle"><a href="API-usb-bus-start-enum.html"><span class="phrase">usb_bus_start_enum</span></a></span><span class="refpurpose"> &#8212; 
18     start immediate enumeration (for OTG)
19 </span></dt><dt><span class="refentrytitle"><a href="API-usb-hcd-irq.html"><span class="phrase">usb_hcd_irq</span></a></span><span class="refpurpose"> &#8212; 
20     hook IRQs to HCD framework (bus glue)
21 </span></dt><dt><span class="refentrytitle"><a href="API-usb-hc-died.html"><span class="phrase">usb_hc_died</span></a></span><span class="refpurpose"> &#8212; 
22     report abnormal shutdown of a host controller (bus glue)
23 </span></dt><dt><span class="refentrytitle"><a href="API-usb-create-shared-hcd.html"><span class="phrase">usb_create_shared_hcd</span></a></span><span class="refpurpose"> &#8212; 
24     create and initialize an HCD structure
25 </span></dt><dt><span class="refentrytitle"><a href="API-usb-create-hcd.html"><span class="phrase">usb_create_hcd</span></a></span><span class="refpurpose"> &#8212; 
26     create and initialize an HCD structure
27 </span></dt><dt><span class="refentrytitle"><a href="API-usb-add-hcd.html"><span class="phrase">usb_add_hcd</span></a></span><span class="refpurpose"> &#8212; 
28     finish generic HCD structure initialization and register
29 </span></dt><dt><span class="refentrytitle"><a href="API-usb-remove-hcd.html"><span class="phrase">usb_remove_hcd</span></a></span><span class="refpurpose"> &#8212; 
30     shutdown processing for generic HCDs
31 </span></dt><dt><span class="refentrytitle"><a href="API-usb-hcd-pci-probe.html"><span class="phrase">usb_hcd_pci_probe</span></a></span><span class="refpurpose"> &#8212; 
32  initialize PCI-based HCDs
33 </span></dt><dt><span class="refentrytitle"><a href="API-usb-hcd-pci-remove.html"><span class="phrase">usb_hcd_pci_remove</span></a></span><span class="refpurpose"> &#8212; 
34     shutdown processing for PCI-based HCDs
35 </span></dt><dt><span class="refentrytitle"><a href="API-usb-hcd-pci-shutdown.html"><span class="phrase">usb_hcd_pci_shutdown</span></a></span><span class="refpurpose"> &#8212; 
36     shutdown host controller
37 </span></dt><dt><span class="refentrytitle"><a href="API-hcd-buffer-create.html"><span class="phrase">hcd_buffer_create</span></a></span><span class="refpurpose"> &#8212; 
38  initialize buffer pools
39 </span></dt><dt><span class="refentrytitle"><a href="API-hcd-buffer-destroy.html"><span class="phrase">hcd_buffer_destroy</span></a></span><span class="refpurpose"> &#8212; 
40     deallocate buffer pools
41 </span></dt></dl></div><p>These APIs are only for use by host controller drivers,
42    most of which implement standard register interfaces such as
43    EHCI, OHCI, or UHCI.
44    UHCI was one of the first interfaces, designed by Intel and
45    also used by VIA; it doesn't do much in hardware.
46    OHCI was designed later, to have the hardware do more work
47    (bigger transfers, tracking protocol state, and so on).
48    EHCI was designed with USB 2.0; its design has features that
49    resemble OHCI (hardware does much more work) as well as
50    UHCI (some parts of ISO support, TD list processing).
51    </p><p>There are host controllers other than the "big three",
52    although most PCI based controllers (and a few non-PCI based
53    ones) use one of those interfaces.
54    Not all host controllers use DMA; some use PIO, and there
55    is also a simulator.
56    </p><p>The same basic APIs are available to drivers for all
57    those controllers.  
58    For historical reasons they are in two layers:
59    <span class="structname">struct usb_bus</span> is a rather thin
60    layer that became available in the 2.2 kernels, while
61    <span class="structname">struct usb_hcd</span> is a more featureful
62    layer (available in later 2.4 kernels and in 2.5) that
63    lets HCDs share common code, to shrink driver size
64    and significantly reduce hcd-specific behaviors.
65    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-usb-hub-find-child.html">Prev</a>&#160;</td><td width="20%" align="center">&#160;</td><td width="40%" align="right">&#160;<a accesskey="n" href="API-usb-calc-bus-time.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">usb_hub_find_child</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">usb_calc_bus_time</span></td></tr></table></div></body></html>
66