1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>The Linux-USB Host Side API</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="next" href="intro.html" title="Chapter 1. Introduction to USB on Linux"></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">The Linux-USB Host Side API</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr></table><hr></div><div class="book"><div class="titlepage"><div><div><h1 class="title"><a name="Linux-USB-API"></a>The Linux-USB Host Side API</h1></div><div><div class="legalnotice"><a name="idp1114033524"></a><p> 2 This documentation is free software; you can redistribute 3 it and/or modify it under the terms of the GNU General Public 4 License as published by the Free Software Foundation; either 5 version 2 of the License, or (at your option) any later 6 version. 7 </p><p> 8 This program is distributed in the hope that it will be 9 useful, but WITHOUT ANY WARRANTY; without even the implied 10 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 See the GNU General Public License for more details. 12 </p><p> 13 You should have received a copy of the GNU General Public 14 License along with this program; if not, write to the Free 15 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 16 MA 02111-1307 USA 17 </p><p> 18 For more details see the file COPYING in the source 19 distribution of Linux. 20 </p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="chapter"><a href="intro.html">1. Introduction to USB on Linux</a></span></dt><dt><span class="chapter"><a href="host.html">2. USB Host-Side API Model</a></span></dt><dt><span class="chapter"><a href="types.html">3. USB-Standard Types</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="API-usb-speed-string.html"><span class="phrase">usb_speed_string</span></a></span><span class="refpurpose"> — 21 Returns human readable-name of the speed. 22 </span></dt><dt><span class="refentrytitle"><a href="API-usb-state-string.html"><span class="phrase">usb_state_string</span></a></span><span class="refpurpose"> — 23 Returns human readable name for the state. 24 </span></dt></dl></dd><dt><span class="chapter"><a href="hostside.html">4. Host-Side Data Types and Macros</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="API-struct-usb-host-endpoint.html"><span class="phrase">struct usb_host_endpoint</span></a></span><span class="refpurpose"> — 25 host-side endpoint descriptor and queue 26 </span></dt><dt><span class="refentrytitle"><a href="API-struct-usb-interface.html"><span class="phrase">struct usb_interface</span></a></span><span class="refpurpose"> — 27 what usb device drivers talk to 28 </span></dt><dt><span class="refentrytitle"><a href="API-struct-usb-interface-cache.html"><span class="phrase">struct usb_interface_cache</span></a></span><span class="refpurpose"> — 29 long-term representation of a device interface 30 </span></dt><dt><span class="refentrytitle"><a href="API-struct-usb-host-config.html"><span class="phrase">struct usb_host_config</span></a></span><span class="refpurpose"> — 31 representation of a device's configuration 32 </span></dt><dt><span class="refentrytitle"><a href="API-struct-usb-device.html"><span class="phrase">struct usb_device</span></a></span><span class="refpurpose"> — 33 kernel's representation of a USB device 34 </span></dt><dt><span class="refentrytitle"><a href="API-usb-hub-for-each-child.html"><span class="phrase">usb_hub_for_each_child</span></a></span><span class="refpurpose"> — 35 iterate over all child devices on the hub 36 </span></dt><dt><span class="refentrytitle"><a href="API-usb-interface-claimed.html"><span class="phrase">usb_interface_claimed</span></a></span><span class="refpurpose"> — 37 returns true iff an interface is claimed 38 </span></dt><dt><span class="refentrytitle"><a href="API-usb-make-path.html"><span class="phrase">usb_make_path</span></a></span><span class="refpurpose"> — 39 returns stable device path in the usb tree 40 </span></dt><dt><span class="refentrytitle"><a href="API-USB-DEVICE.html"><span class="phrase">USB_DEVICE</span></a></span><span class="refpurpose"> — 41 macro used to describe a specific usb device 42 </span></dt><dt><span class="refentrytitle"><a href="API-USB-DEVICE-VER.html"><span class="phrase">USB_DEVICE_VER</span></a></span><span class="refpurpose"> — 43 describe a specific usb device with a version range 44 </span></dt><dt><span class="refentrytitle"><a href="API-USB-DEVICE-INTERFACE-CLASS.html"><span class="phrase">USB_DEVICE_INTERFACE_CLASS</span></a></span><span class="refpurpose"> — 45 describe a usb device with a specific interface class 46 </span></dt><dt><span class="refentrytitle"><a href="API-USB-DEVICE-INTERFACE-PROTOCOL.html"><span class="phrase">USB_DEVICE_INTERFACE_PROTOCOL</span></a></span><span class="refpurpose"> — 47 describe a usb device with a specific interface protocol 48 </span></dt><dt><span class="refentrytitle"><a href="API-USB-DEVICE-INTERFACE-NUMBER.html"><span class="phrase">USB_DEVICE_INTERFACE_NUMBER</span></a></span><span class="refpurpose"> — 49 describe a usb device with a specific interface number 50 </span></dt><dt><span class="refentrytitle"><a href="API-USB-DEVICE-INFO.html"><span class="phrase">USB_DEVICE_INFO</span></a></span><span class="refpurpose"> — 51 macro used to describe a class of usb devices 52 </span></dt><dt><span class="refentrytitle"><a href="API-USB-INTERFACE-INFO.html"><span class="phrase">USB_INTERFACE_INFO</span></a></span><span class="refpurpose"> — 53 macro used to describe a class of usb interfaces 54 </span></dt><dt><span class="refentrytitle"><a href="API-USB-DEVICE-AND-INTERFACE-INFO.html"><span class="phrase">USB_DEVICE_AND_INTERFACE_INFO</span></a></span><span class="refpurpose"> — 55 describe a specific usb device with a class of usb interfaces 56 </span></dt><dt><span class="refentrytitle"><a href="API-USB-VENDOR-AND-INTERFACE-INFO.html"><span class="phrase">USB_VENDOR_AND_INTERFACE_INFO</span></a></span><span class="refpurpose"> — 57 describe a specific usb vendor with a class of usb interfaces 58 </span></dt><dt><span class="refentrytitle"><a href="API-struct-usbdrv-wrap.html"><span class="phrase">struct usbdrv_wrap</span></a></span><span class="refpurpose"> — 59 wrapper for driver-model structure 60 </span></dt><dt><span class="refentrytitle"><a href="API-struct-usb-driver.html"><span class="phrase">struct usb_driver</span></a></span><span class="refpurpose"> — 61 identifies USB interface driver to usbcore 62 </span></dt><dt><span class="refentrytitle"><a href="API-struct-usb-device-driver.html"><span class="phrase">struct usb_device_driver</span></a></span><span class="refpurpose"> — 63 identifies USB device driver to usbcore 64 </span></dt><dt><span class="refentrytitle"><a href="API-struct-usb-class-driver.html"><span class="phrase">struct usb_class_driver</span></a></span><span class="refpurpose"> — 65 identifies a USB driver that wants to use the USB major number 66 </span></dt><dt><span class="refentrytitle"><a href="API-module-usb-driver.html"><span class="phrase">module_usb_driver</span></a></span><span class="refpurpose"> — 67 Helper macro for registering a USB driver 68 </span></dt><dt><span class="refentrytitle"><a href="API-struct-urb.html"><span class="phrase">struct urb</span></a></span><span class="refpurpose"> — 69 USB Request Block 70 </span></dt><dt><span class="refentrytitle"><a href="API-usb-fill-control-urb.html"><span class="phrase">usb_fill_control_urb</span></a></span><span class="refpurpose"> — 71 initializes a control urb 72 </span></dt><dt><span class="refentrytitle"><a href="API-usb-fill-bulk-urb.html"><span class="phrase">usb_fill_bulk_urb</span></a></span><span class="refpurpose"> — 73 macro to help initialize a bulk urb 74 </span></dt><dt><span class="refentrytitle"><a href="API-usb-fill-int-urb.html"><span class="phrase">usb_fill_int_urb</span></a></span><span class="refpurpose"> — 75 macro to help initialize a interrupt urb 76 </span></dt><dt><span class="refentrytitle"><a href="API-usb-urb-dir-in.html"><span class="phrase">usb_urb_dir_in</span></a></span><span class="refpurpose"> — 77 check if an URB describes an IN transfer 78 </span></dt><dt><span class="refentrytitle"><a href="API-usb-urb-dir-out.html"><span class="phrase">usb_urb_dir_out</span></a></span><span class="refpurpose"> — 79 check if an URB describes an OUT transfer 80 </span></dt><dt><span class="refentrytitle"><a href="API-struct-usb-sg-request.html"><span class="phrase">struct usb_sg_request</span></a></span><span class="refpurpose"> — 81 support for scatter/gather I/O 82 </span></dt></dl></dd><dt><span class="chapter"><a href="usbcore.html">5. USB Core APIs</a></span></dt><dd><dl><dt><span class="refentrytitle"><a href="API-usb-init-urb.html"><span class="phrase">usb_init_urb</span></a></span><span class="refpurpose"> — 83 initializes a urb so that it can be used by a USB driver 84 </span></dt><dt><span class="refentrytitle"><a href="API-usb-alloc-urb.html"><span class="phrase">usb_alloc_urb</span></a></span><span class="refpurpose"> — 85 creates a new urb for a USB driver to use 86 </span></dt><dt><span class="refentrytitle"><a href="API-usb-free-urb.html"><span class="phrase">usb_free_urb</span></a></span><span class="refpurpose"> — 87 frees the memory used by a urb when all users of it are finished 88 </span></dt><dt><span class="refentrytitle"><a href="API-usb-get-urb.html"><span class="phrase">usb_get_urb</span></a></span><span class="refpurpose"> — 89 increments the reference count of the urb 90 </span></dt><dt><span class="refentrytitle"><a href="API-usb-anchor-urb.html"><span class="phrase">usb_anchor_urb</span></a></span><span class="refpurpose"> — 91 anchors an URB while it is processed 92 </span></dt><dt><span class="refentrytitle"><a href="API-usb-unanchor-urb.html"><span class="phrase">usb_unanchor_urb</span></a></span><span class="refpurpose"> — 93 unanchors an URB 94 </span></dt><dt><span class="refentrytitle"><a href="API-usb-submit-urb.html"><span class="phrase">usb_submit_urb</span></a></span><span class="refpurpose"> — 95 issue an asynchronous transfer request for an endpoint 96 </span></dt><dt><span class="refentrytitle"><a href="API-usb-unlink-urb.html"><span class="phrase">usb_unlink_urb</span></a></span><span class="refpurpose"> — 97 abort/cancel a transfer request for an endpoint 98 </span></dt><dt><span class="refentrytitle"><a href="API-usb-kill-urb.html"><span class="phrase">usb_kill_urb</span></a></span><span class="refpurpose"> — 99 cancel a transfer request and wait for it to finish 100 </span></dt><dt><span class="refentrytitle"><a href="API-usb-poison-urb.html"><span class="phrase">usb_poison_urb</span></a></span><span class="refpurpose"> — 101 reliably kill a transfer and prevent further use of an URB 102 </span></dt><dt><span class="refentrytitle"><a href="API-usb-block-urb.html"><span class="phrase">usb_block_urb</span></a></span><span class="refpurpose"> — 103 reliably prevent further use of an URB 104 </span></dt><dt><span class="refentrytitle"><a href="API-usb-kill-anchored-urbs.html"><span class="phrase">usb_kill_anchored_urbs</span></a></span><span class="refpurpose"> — 105 cancel transfer requests en masse 106 </span></dt><dt><span class="refentrytitle"><a href="API-usb-poison-anchored-urbs.html"><span class="phrase">usb_poison_anchored_urbs</span></a></span><span class="refpurpose"> — 107 cease all traffic from an anchor 108 </span></dt><dt><span class="refentrytitle"><a href="API-usb-unpoison-anchored-urbs.html"><span class="phrase">usb_unpoison_anchored_urbs</span></a></span><span class="refpurpose"> — 109 let an anchor be used successfully again 110 </span></dt><dt><span class="refentrytitle"><a href="API-usb-unlink-anchored-urbs.html"><span class="phrase">usb_unlink_anchored_urbs</span></a></span><span class="refpurpose"> — 111 asynchronously cancel transfer requests en masse 112 </span></dt><dt><span class="refentrytitle"><a href="API-usb-anchor-suspend-wakeups.html"><span class="phrase">usb_anchor_suspend_wakeups</span></a></span><span class="refpurpose"> — 113 </span></dt><dt><span class="refentrytitle"><a href="API-usb-anchor-resume-wakeups.html"><span class="phrase">usb_anchor_resume_wakeups</span></a></span><span class="refpurpose"> — 114 </span></dt><dt><span class="refentrytitle"><a href="API-usb-wait-anchor-empty-timeout.html"><span class="phrase">usb_wait_anchor_empty_timeout</span></a></span><span class="refpurpose"> — 115 wait for an anchor to be unused 116 </span></dt><dt><span class="refentrytitle"><a href="API-usb-get-from-anchor.html"><span class="phrase">usb_get_from_anchor</span></a></span><span class="refpurpose"> — 117 get an anchor's oldest urb 118 </span></dt><dt><span class="refentrytitle"><a href="API-usb-scuttle-anchored-urbs.html"><span class="phrase">usb_scuttle_anchored_urbs</span></a></span><span class="refpurpose"> — 119 unanchor all an anchor's urbs 120 </span></dt><dt><span class="refentrytitle"><a href="API-usb-anchor-empty.html"><span class="phrase">usb_anchor_empty</span></a></span><span class="refpurpose"> — 121 is an anchor empty 122 </span></dt><dt><span class="refentrytitle"><a href="API-usb-control-msg.html"><span class="phrase">usb_control_msg</span></a></span><span class="refpurpose"> — 123 Builds a control urb, sends it off and waits for completion 124 </span></dt><dt><span class="refentrytitle"><a href="API-usb-interrupt-msg.html"><span class="phrase">usb_interrupt_msg</span></a></span><span class="refpurpose"> — 125 Builds an interrupt urb, sends it off and waits for completion 126 </span></dt><dt><span class="refentrytitle"><a href="API-usb-bulk-msg.html"><span class="phrase">usb_bulk_msg</span></a></span><span class="refpurpose"> — 127 Builds a bulk urb, sends it off and waits for completion 128 </span></dt><dt><span class="refentrytitle"><a href="API-usb-sg-init.html"><span class="phrase">usb_sg_init</span></a></span><span class="refpurpose"> — 129 initializes scatterlist-based bulk/interrupt I/O request 130 </span></dt><dt><span class="refentrytitle"><a href="API-usb-sg-wait.html"><span class="phrase">usb_sg_wait</span></a></span><span class="refpurpose"> — 131 synchronously execute scatter/gather request 132 </span></dt><dt><span class="refentrytitle"><a href="API-usb-sg-cancel.html"><span class="phrase">usb_sg_cancel</span></a></span><span class="refpurpose"> — 133 stop scatter/gather i/o issued by <code class="function">usb_sg_wait</code> 134 </span></dt><dt><span class="refentrytitle"><a href="API-usb-get-descriptor.html"><span class="phrase">usb_get_descriptor</span></a></span><span class="refpurpose"> — 135 issues a generic GET_DESCRIPTOR request 136 </span></dt><dt><span class="refentrytitle"><a href="API-usb-string.html"><span class="phrase">usb_string</span></a></span><span class="refpurpose"> — 137 returns UTF-8 version of a string descriptor 138 </span></dt><dt><span class="refentrytitle"><a href="API-usb-get-status.html"><span class="phrase">usb_get_status</span></a></span><span class="refpurpose"> — 139 issues a GET_STATUS call 140 </span></dt><dt><span class="refentrytitle"><a href="API-usb-clear-halt.html"><span class="phrase">usb_clear_halt</span></a></span><span class="refpurpose"> — 141 tells device to clear endpoint halt/stall condition 142 </span></dt><dt><span class="refentrytitle"><a href="API-usb-reset-endpoint.html"><span class="phrase">usb_reset_endpoint</span></a></span><span class="refpurpose"> — 143 Reset an endpoint's state. 144 </span></dt><dt><span class="refentrytitle"><a href="API-usb-set-interface.html"><span class="phrase">usb_set_interface</span></a></span><span class="refpurpose"> — 145 Makes a particular alternate setting be current 146 </span></dt><dt><span class="refentrytitle"><a href="API-usb-reset-configuration.html"><span class="phrase">usb_reset_configuration</span></a></span><span class="refpurpose"> — 147 lightweight device reset 148 </span></dt><dt><span class="refentrytitle"><a href="API-usb-driver-set-configuration.html"><span class="phrase">usb_driver_set_configuration</span></a></span><span class="refpurpose"> — 149 Provide a way for drivers to change device configurations 150 </span></dt><dt><span class="refentrytitle"><a href="API-usb-register-dev.html"><span class="phrase">usb_register_dev</span></a></span><span class="refpurpose"> — 151 register a USB device, and ask for a minor number 152 </span></dt><dt><span class="refentrytitle"><a href="API-usb-deregister-dev.html"><span class="phrase">usb_deregister_dev</span></a></span><span class="refpurpose"> — 153 deregister a USB device's dynamic minor. 154 </span></dt><dt><span class="refentrytitle"><a href="API-usb-driver-claim-interface.html"><span class="phrase">usb_driver_claim_interface</span></a></span><span class="refpurpose"> — 155 bind a driver to an interface 156 </span></dt><dt><span class="refentrytitle"><a href="API-usb-driver-release-interface.html"><span class="phrase">usb_driver_release_interface</span></a></span><span class="refpurpose"> — 157 unbind a driver from an interface 158 </span></dt><dt><span class="refentrytitle"><a href="API-usb-match-id.html"><span class="phrase">usb_match_id</span></a></span><span class="refpurpose"> — 159 find first usb_device_id matching device or interface 160 </span></dt><dt><span class="refentrytitle"><a href="API-usb-register-device-driver.html"><span class="phrase">usb_register_device_driver</span></a></span><span class="refpurpose"> — 161 register a USB device (not interface) driver 162 </span></dt><dt><span class="refentrytitle"><a href="API-usb-deregister-device-driver.html"><span class="phrase">usb_deregister_device_driver</span></a></span><span class="refpurpose"> — 163 unregister a USB device (not interface) driver 164 </span></dt><dt><span class="refentrytitle"><a href="API-usb-register-driver.html"><span class="phrase">usb_register_driver</span></a></span><span class="refpurpose"> — 165 register a USB interface driver 166 </span></dt><dt><span class="refentrytitle"><a href="API-usb-deregister.html"><span class="phrase">usb_deregister</span></a></span><span class="refpurpose"> — 167 unregister a USB interface driver 168 </span></dt><dt><span class="refentrytitle"><a href="API-usb-enable-autosuspend.html"><span class="phrase">usb_enable_autosuspend</span></a></span><span class="refpurpose"> — 169 allow a USB device to be autosuspended 170 </span></dt><dt><span class="refentrytitle"><a href="API-usb-disable-autosuspend.html"><span class="phrase">usb_disable_autosuspend</span></a></span><span class="refpurpose"> — 171 prevent a USB device from being autosuspended 172 </span></dt><dt><span class="refentrytitle"><a href="API-usb-autopm-put-interface.html"><span class="phrase">usb_autopm_put_interface</span></a></span><span class="refpurpose"> — 173 decrement a USB interface's PM-usage counter 174 </span></dt><dt><span class="refentrytitle"><a href="API-usb-autopm-put-interface-async.html"><span class="phrase">usb_autopm_put_interface_async</span></a></span><span class="refpurpose"> — 175 decrement a USB interface's PM-usage counter 176 </span></dt><dt><span class="refentrytitle"><a href="API-usb-autopm-put-interface-no-suspend.html"><span class="phrase">usb_autopm_put_interface_no_suspend</span></a></span><span class="refpurpose"> — 177 decrement a USB interface's PM-usage counter 178 </span></dt><dt><span class="refentrytitle"><a href="API-usb-autopm-get-interface.html"><span class="phrase">usb_autopm_get_interface</span></a></span><span class="refpurpose"> — 179 increment a USB interface's PM-usage counter 180 </span></dt><dt><span class="refentrytitle"><a href="API-usb-autopm-get-interface-async.html"><span class="phrase">usb_autopm_get_interface_async</span></a></span><span class="refpurpose"> — 181 increment a USB interface's PM-usage counter 182 </span></dt><dt><span class="refentrytitle"><a href="API-usb-autopm-get-interface-no-resume.html"><span class="phrase">usb_autopm_get_interface_no_resume</span></a></span><span class="refpurpose"> — 183 increment a USB interface's PM-usage counter 184 </span></dt><dt><span class="refentrytitle"><a href="API-usb-find-alt-setting.html"><span class="phrase">usb_find_alt_setting</span></a></span><span class="refpurpose"> — 185 Given a configuration, find the alternate setting for the given interface. 186 </span></dt><dt><span class="refentrytitle"><a href="API-usb-ifnum-to-if.html"><span class="phrase">usb_ifnum_to_if</span></a></span><span class="refpurpose"> — 187 get the interface object with a given interface number 188 </span></dt><dt><span class="refentrytitle"><a href="API-usb-altnum-to-altsetting.html"><span class="phrase">usb_altnum_to_altsetting</span></a></span><span class="refpurpose"> — 189 get the altsetting structure with a given alternate setting number. 190 </span></dt><dt><span class="refentrytitle"><a href="API-usb-find-interface.html"><span class="phrase">usb_find_interface</span></a></span><span class="refpurpose"> — 191 find usb_interface pointer for driver and device 192 </span></dt><dt><span class="refentrytitle"><a href="API-usb-for-each-dev.html"><span class="phrase">usb_for_each_dev</span></a></span><span class="refpurpose"> — 193 iterate over all USB devices in the system 194 </span></dt><dt><span class="refentrytitle"><a href="API-usb-alloc-dev.html"><span class="phrase">usb_alloc_dev</span></a></span><span class="refpurpose"> — 195 usb device constructor (usbcore-internal) 196 </span></dt><dt><span class="refentrytitle"><a href="API-usb-get-dev.html"><span class="phrase">usb_get_dev</span></a></span><span class="refpurpose"> — 197 increments the reference count of the usb device structure 198 </span></dt><dt><span class="refentrytitle"><a href="API-usb-put-dev.html"><span class="phrase">usb_put_dev</span></a></span><span class="refpurpose"> — 199 release a use of the usb device structure 200 </span></dt><dt><span class="refentrytitle"><a href="API-usb-get-intf.html"><span class="phrase">usb_get_intf</span></a></span><span class="refpurpose"> — 201 increments the reference count of the usb interface structure 202 </span></dt><dt><span class="refentrytitle"><a href="API-usb-put-intf.html"><span class="phrase">usb_put_intf</span></a></span><span class="refpurpose"> — 203 release a use of the usb interface structure 204 </span></dt><dt><span class="refentrytitle"><a href="API-usb-lock-device-for-reset.html"><span class="phrase">usb_lock_device_for_reset</span></a></span><span class="refpurpose"> — 205 cautiously acquire the lock for a usb device structure 206 </span></dt><dt><span class="refentrytitle"><a href="API-usb-get-current-frame-number.html"><span class="phrase">usb_get_current_frame_number</span></a></span><span class="refpurpose"> — 207 return current bus frame number 208 </span></dt><dt><span class="refentrytitle"><a href="API-usb-alloc-coherent.html"><span class="phrase">usb_alloc_coherent</span></a></span><span class="refpurpose"> — 209 allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP 210 </span></dt><dt><span class="refentrytitle"><a href="API-usb-free-coherent.html"><span class="phrase">usb_free_coherent</span></a></span><span class="refpurpose"> — 211 free memory allocated with <code class="function">usb_alloc_coherent</code> 212 </span></dt><dt><span class="refentrytitle"><a href="API-usb-buffer-map.html"><span class="phrase">usb_buffer_map</span></a></span><span class="refpurpose"> — 213 create DMA mapping(s) for an urb 214 </span></dt><dt><span class="refentrytitle"><a href="API-usb-buffer-dmasync.html"><span class="phrase">usb_buffer_dmasync</span></a></span><span class="refpurpose"> — 215 synchronize DMA and CPU view of buffer(s) 216 </span></dt><dt><span class="refentrytitle"><a href="API-usb-buffer-unmap.html"><span class="phrase">usb_buffer_unmap</span></a></span><span class="refpurpose"> — 217 free DMA mapping(s) for an urb 218 </span></dt><dt><span class="refentrytitle"><a href="API-usb-buffer-map-sg.html"><span class="phrase">usb_buffer_map_sg</span></a></span><span class="refpurpose"> — 219 create scatterlist DMA mapping(s) for an endpoint 220 </span></dt><dt><span class="refentrytitle"><a href="API-usb-buffer-dmasync-sg.html"><span class="phrase">usb_buffer_dmasync_sg</span></a></span><span class="refpurpose"> — 221 synchronize DMA and CPU view of scatterlist buffer(s) 222 </span></dt><dt><span class="refentrytitle"><a href="API-usb-buffer-unmap-sg.html"><span class="phrase">usb_buffer_unmap_sg</span></a></span><span class="refpurpose"> — 223 free DMA mapping(s) for a scatterlist 224 </span></dt><dt><span class="refentrytitle"><a href="API-usb-hub-clear-tt-buffer.html"><span class="phrase">usb_hub_clear_tt_buffer</span></a></span><span class="refpurpose"> — 225 clear control/bulk TT state in high speed hub 226 </span></dt><dt><span class="refentrytitle"><a href="API-usb-set-device-state.html"><span class="phrase">usb_set_device_state</span></a></span><span class="refpurpose"> — 227 change a device's current state (usbcore, hcds) 228 </span></dt><dt><span class="refentrytitle"><a href="API-usb-root-hub-lost-power.html"><span class="phrase">usb_root_hub_lost_power</span></a></span><span class="refpurpose"> — 229 called by HCD if the root hub lost Vbus power 230 </span></dt><dt><span class="refentrytitle"><a href="API-usb-reset-device.html"><span class="phrase">usb_reset_device</span></a></span><span class="refpurpose"> — 231 warn interface drivers and perform a USB port reset 232 </span></dt><dt><span class="refentrytitle"><a href="API-usb-queue-reset-device.html"><span class="phrase">usb_queue_reset_device</span></a></span><span class="refpurpose"> — 233 Reset a USB device from an atomic context 234 </span></dt><dt><span class="refentrytitle"><a href="API-usb-hub-find-child.html"><span class="phrase">usb_hub_find_child</span></a></span><span class="refpurpose"> — 235 Get the pointer of child device attached to the port which is specified by <em class="parameter"><code>port1</code></em>. 236 </span></dt></dl></dd><dt><span class="chapter"><a href="hcd.html">6. Host Controller APIs</a></span></dt><dd><dl><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"> — 237 approximate periodic transaction time in nanoseconds 238 </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"> — 239 add an URB to its endpoint queue 240 </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"> — 241 check whether an URB may be unlinked 242 </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"> — 243 remove an URB from its endpoint queue 244 </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"> — 245 return URB from HCD to device driver 246 </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"> — 247 allocate bulk endpoint stream IDs. 248 </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"> — 249 free bulk endpoint stream IDs. 250 </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"> — 251 called by HCD to resume its root hub 252 </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"> — 253 start immediate enumeration (for OTG) 254 </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"> — 255 hook IRQs to HCD framework (bus glue) 256 </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"> — 257 report abnormal shutdown of a host controller (bus glue) 258 </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"> — 259 create and initialize an HCD structure 260 </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"> — 261 create and initialize an HCD structure 262 </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"> — 263 finish generic HCD structure initialization and register 264 </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"> — 265 shutdown processing for generic HCDs 266 </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"> — 267 initialize PCI-based HCDs 268 </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"> — 269 shutdown processing for PCI-based HCDs 270 </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"> — 271 shutdown host controller 272 </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"> — 273 initialize buffer pools 274 </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"> — 275 deallocate buffer pools 276 </span></dt></dl></dd><dt><span class="chapter"><a href="usbfs.html">7. The USB Filesystem (usbfs)</a></span></dt><dd><dl><dt><span class="sect1"><a href="usbfs.html#usbfs-files">What files are in "usbfs"?</a></span></dt><dt><span class="sect1"><a href="usbfs-fstab.html">Mounting and Access Control</a></span></dt><dt><span class="sect1"><a href="usbfs-devices.html">/proc/bus/usb/devices</a></span></dt><dt><span class="sect1"><a href="usbfs-bbbddd.html">/proc/bus/usb/BBB/DDD</a></span></dt><dt><span class="sect1"><a href="usbfs-lifecycle.html">Life Cycle of User Mode Drivers</a></span></dt><dt><span class="sect1"><a href="usbfs-ioctl.html">The ioctl() Requests</a></span></dt><dd><dl><dt><span class="sect2"><a href="usbfs-ioctl.html#usbfs-mgmt">Management/Status Requests</a></span></dt><dt><span class="sect2"><a href="usbfs-ioctl.html#usbfs-sync">Synchronous I/O Support</a></span></dt><dt><span class="sect2"><a href="usbfs-ioctl.html#usbfs-async">Asynchronous I/O Support</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> Chapter 1. Introduction to USB on Linux</td></tr></table></div></body></html> 277