1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>rio_get_asm</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="RapidIO Subsystem Guide"><link rel="up" href="drivers.html#Functions" title="Functions"><link rel="prev" href="API-rio-mport-get-feature.html" title="rio_mport_get_feature"><link rel="next" href="API-rio-get-device.html" title="rio_get_device"></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">rio_get_asm</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-rio-mport-get-feature.html">Prev</a>&#160;</td><th width="60%" align="center">Functions</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-rio-get-device.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-rio-get-asm"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rio_get_asm &#8212; 
2     Begin or continue searching for a RIO device by vid/did/asm_vid/asm_did
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 rio_dev * <b class="fsfunc">rio_get_asm </b>(</code></td><td>u16 <var class="pdparam">vid</var>, </td></tr><tr><td>&#160;</td><td>u16 <var class="pdparam">did</var>, </td></tr><tr><td>&#160;</td><td>u16 <var class="pdparam">asm_vid</var>, </td></tr><tr><td>&#160;</td><td>u16 <var class="pdparam">asm_did</var>, </td></tr><tr><td>&#160;</td><td>struct rio_dev * <var class="pdparam">from</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1109544372"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>vid</code></em></span></dt><dd><p>
4     RIO vid to match or <code class="constant">RIO_ANY_ID</code> to match all vids
5    </p></dd><dt><span class="term"><em class="parameter"><code>did</code></em></span></dt><dd><p>
6     RIO did to match or <code class="constant">RIO_ANY_ID</code> to match all dids
7    </p></dd><dt><span class="term"><em class="parameter"><code>asm_vid</code></em></span></dt><dd><p>
8     RIO asm_vid to match or <code class="constant">RIO_ANY_ID</code> to match all asm_vids
9    </p></dd><dt><span class="term"><em class="parameter"><code>asm_did</code></em></span></dt><dd><p>
10     RIO asm_did to match or <code class="constant">RIO_ANY_ID</code> to match all asm_dids
11    </p></dd><dt><span class="term"><em class="parameter"><code>from</code></em></span></dt><dd><p>
12     Previous RIO device found in search, or <code class="constant">NULL</code> for new search
13    </p></dd></dl></div></div><div class="refsect1"><a name="idp1109550724"></a><h2>Description</h2><p>
14   Iterates through the list of known RIO devices. If a RIO device is
15   found with a matching <em class="parameter"><code>vid</code></em>, <em class="parameter"><code>did</code></em>, <em class="parameter"><code>asm_vid</code></em>, <em class="parameter"><code>asm_did</code></em>, the reference
16   count to the device is incrememted and a pointer to its device
17   structure is returned. Otherwise, <code class="constant">NULL</code> is returned. A new search
18   is initiated by passing <code class="constant">NULL</code> to the <em class="parameter"><code>from</code></em> argument. Otherwise, if
19   <em class="parameter"><code>from</code></em> is not <code class="constant">NULL</code>, searches continue from next device on the global
20   list. The reference count for <em class="parameter"><code>from</code></em> is always decremented if it is
21   not <code class="constant">NULL</code>.
22</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-rio-mport-get-feature.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="drivers.html#Functions">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-rio-get-device.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">rio_mport_get_feature</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">rio_get_device</span></td></tr></table></div></body></html>
23