1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>usb_buffer_map</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="usbcore.html" title="Chapter&#160;5.&#160;USB Core APIs"><link rel="prev" href="API-usb-free-coherent.html" title="usb_free_coherent"><link rel="next" href="API-usb-buffer-dmasync.html" title="usb_buffer_dmasync"></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"><span class="phrase">usb_buffer_map</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-usb-free-coherent.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;5.&#160;USB Core APIs</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-usb-buffer-dmasync.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-usb-buffer-map"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>usb_buffer_map &#8212; 
2     create DMA mapping(s) for an urb
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">struct urb * <b class="fsfunc">usb_buffer_map </b>(</code></td><td>struct urb * <var class="pdparam">urb</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1116590092"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>urb</code></em></span></dt><dd><p>
4     urb whose transfer_buffer/setup_packet will be mapped
5    </p></dd></dl></div></div><div class="refsect1"><a name="idp1116591724"></a><h2>Description</h2><p>
6   URB_NO_TRANSFER_DMA_MAP is added to urb-&gt;transfer_flags if the operation
7   succeeds. If the device is connected to this system through a non-DMA
8   controller, this operation always succeeds.
9   </p><p>
10
11   This call would normally be used for an urb which is reused, perhaps
12   as the target of a large periodic transfer, with <code class="function">usb_buffer_dmasync</code>
13   calls to synchronize memory and dma state.
14   </p><p>
15
16   Reverse the effect of this call with <code class="function">usb_buffer_unmap</code>.
17</p></div><div class="refsect1"><a name="idp1116594020"></a><h2>Return</h2><p>
18   Either <code class="constant">NULL</code> (indicating no buffer could be mapped), or <em class="parameter"><code>urb</code></em>.
19</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-usb-free-coherent.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="usbcore.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-usb-buffer-dmasync.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">usb_free_coherent</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_buffer_dmasync</span></td></tr></table></div></body></html>
20