1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3        "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
4	<!ENTITY rapidio SYSTEM "rapidio.xml">
5	]>
6
7<book id="RapidIO-Guide">
8 <bookinfo>
9  <title>RapidIO Subsystem Guide</title>
10
11  <authorgroup>
12   <author>
13    <firstname>Matt</firstname>
14    <surname>Porter</surname>
15    <affiliation>
16     <address>
17      <email>mporter@kernel.crashing.org</email>
18      <email>mporter@mvista.com</email>
19     </address>
20    </affiliation>
21   </author>
22  </authorgroup>
23
24  <copyright>
25   <year>2005</year>
26   <holder>MontaVista Software, Inc.</holder>
27  </copyright>
28
29  <legalnotice>
30   <para>
31     This documentation is free software; you can redistribute
32     it and/or modify it under the terms of the GNU General Public
33     License version 2 as published by the Free Software Foundation.
34   </para>
35
36   <para>
37     This program is distributed in the hope that it will be
38     useful, but WITHOUT ANY WARRANTY; without even the implied
39     warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
40     See the GNU General Public License for more details.
41   </para>
42
43   <para>
44     You should have received a copy of the GNU General Public
45     License along with this program; if not, write to the Free
46     Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
47     MA 02111-1307 USA
48   </para>
49
50   <para>
51     For more details see the file COPYING in the source
52     distribution of Linux.
53   </para>
54  </legalnotice>
55 </bookinfo>
56
57<toc></toc>
58
59  <chapter id="intro">
60      <title>Introduction</title>
61  <para>
62	RapidIO is a high speed switched fabric interconnect with
63	features aimed at the embedded market.  RapidIO provides
64	support for memory-mapped I/O as well as message-based
65	transactions over the switched fabric network. RapidIO has
66	a standardized discovery mechanism not unlike the PCI bus
67	standard that allows simple detection of devices in a
68	network.
69  </para>
70  <para>
71  	This documentation is provided for developers intending
72	to support RapidIO on new architectures, write new drivers,
73	or to understand the subsystem internals.
74  </para>
75  </chapter>
76
77  <chapter id="bugs">
78     <title>Known Bugs and Limitations</title>
79
80     <sect1 id="known_bugs">
81     	<title>Bugs</title>
82	  <para>None. ;)</para>
83     </sect1>
84     <sect1 id="Limitations">
85     	<title>Limitations</title>
86	  <para>
87	    <orderedlist>
88	      <listitem><para>Access/management of RapidIO memory regions is not supported</para></listitem>
89	      <listitem><para>Multiple host enumeration is not supported</para></listitem>
90	    </orderedlist>
91	 </para>
92     </sect1>
93  </chapter>
94
95  <chapter id="drivers">
96     	<title>RapidIO driver interface</title>
97	<para>
98		Drivers are provided a set of calls in order
99		to interface with the subsystem to gather info
100		on devices, request/map memory region resources,
101		and manage mailboxes/doorbells.
102	</para>
103	<sect1 id="Functions">
104		<title>Functions</title>
105<!-- include/linux/rio_drv.h -->
106<refentry id="API-rio-local-read-config-32">
107<refentryinfo>
108 <title>LINUX</title>
109 <productname>Kernel Hackers Manual</productname>
110 <date>July 2017</date>
111</refentryinfo>
112<refmeta>
113 <refentrytitle><phrase>rio_local_read_config_32</phrase></refentrytitle>
114 <manvolnum>9</manvolnum>
115 <refmiscinfo class="version">4.1.27</refmiscinfo>
116</refmeta>
117<refnamediv>
118 <refname>rio_local_read_config_32</refname>
119 <refpurpose>
120  Read 32 bits from local configuration space
121 </refpurpose>
122</refnamediv>
123<refsynopsisdiv>
124 <title>Synopsis</title>
125  <funcsynopsis><funcprototype>
126   <funcdef>int <function>rio_local_read_config_32 </function></funcdef>
127   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
128   <paramdef>u32 <parameter>offset</parameter></paramdef>
129   <paramdef>u32 * <parameter>data</parameter></paramdef>
130  </funcprototype></funcsynopsis>
131</refsynopsisdiv>
132<refsect1>
133 <title>Arguments</title>
134 <variablelist>
135  <varlistentry>
136   <term><parameter>port</parameter></term>
137   <listitem>
138    <para>
139     Master port
140    </para>
141   </listitem>
142  </varlistentry>
143  <varlistentry>
144   <term><parameter>offset</parameter></term>
145   <listitem>
146    <para>
147     Offset into local configuration space
148    </para>
149   </listitem>
150  </varlistentry>
151  <varlistentry>
152   <term><parameter>data</parameter></term>
153   <listitem>
154    <para>
155     Pointer to read data into
156    </para>
157   </listitem>
158  </varlistentry>
159 </variablelist>
160</refsect1>
161<refsect1>
162<title>Description</title>
163<para>
164   Reads 32 bits of data from the specified offset within the local
165   device's configuration space.
166</para>
167</refsect1>
168</refentry>
169
170<refentry id="API-rio-local-write-config-32">
171<refentryinfo>
172 <title>LINUX</title>
173 <productname>Kernel Hackers Manual</productname>
174 <date>July 2017</date>
175</refentryinfo>
176<refmeta>
177 <refentrytitle><phrase>rio_local_write_config_32</phrase></refentrytitle>
178 <manvolnum>9</manvolnum>
179 <refmiscinfo class="version">4.1.27</refmiscinfo>
180</refmeta>
181<refnamediv>
182 <refname>rio_local_write_config_32</refname>
183 <refpurpose>
184     Write 32 bits to local configuration space
185 </refpurpose>
186</refnamediv>
187<refsynopsisdiv>
188 <title>Synopsis</title>
189  <funcsynopsis><funcprototype>
190   <funcdef>int <function>rio_local_write_config_32 </function></funcdef>
191   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
192   <paramdef>u32 <parameter>offset</parameter></paramdef>
193   <paramdef>u32 <parameter>data</parameter></paramdef>
194  </funcprototype></funcsynopsis>
195</refsynopsisdiv>
196<refsect1>
197 <title>Arguments</title>
198 <variablelist>
199  <varlistentry>
200   <term><parameter>port</parameter></term>
201   <listitem>
202    <para>
203     Master port
204    </para>
205   </listitem>
206  </varlistentry>
207  <varlistentry>
208   <term><parameter>offset</parameter></term>
209   <listitem>
210    <para>
211     Offset into local configuration space
212    </para>
213   </listitem>
214  </varlistentry>
215  <varlistentry>
216   <term><parameter>data</parameter></term>
217   <listitem>
218    <para>
219     Data to be written
220    </para>
221   </listitem>
222  </varlistentry>
223 </variablelist>
224</refsect1>
225<refsect1>
226<title>Description</title>
227<para>
228   Writes 32 bits of data to the specified offset within the local
229   device's configuration space.
230</para>
231</refsect1>
232</refentry>
233
234<refentry id="API-rio-local-read-config-16">
235<refentryinfo>
236 <title>LINUX</title>
237 <productname>Kernel Hackers Manual</productname>
238 <date>July 2017</date>
239</refentryinfo>
240<refmeta>
241 <refentrytitle><phrase>rio_local_read_config_16</phrase></refentrytitle>
242 <manvolnum>9</manvolnum>
243 <refmiscinfo class="version">4.1.27</refmiscinfo>
244</refmeta>
245<refnamediv>
246 <refname>rio_local_read_config_16</refname>
247 <refpurpose>
248     Read 16 bits from local configuration space
249 </refpurpose>
250</refnamediv>
251<refsynopsisdiv>
252 <title>Synopsis</title>
253  <funcsynopsis><funcprototype>
254   <funcdef>int <function>rio_local_read_config_16 </function></funcdef>
255   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
256   <paramdef>u32 <parameter>offset</parameter></paramdef>
257   <paramdef>u16 * <parameter>data</parameter></paramdef>
258  </funcprototype></funcsynopsis>
259</refsynopsisdiv>
260<refsect1>
261 <title>Arguments</title>
262 <variablelist>
263  <varlistentry>
264   <term><parameter>port</parameter></term>
265   <listitem>
266    <para>
267     Master port
268    </para>
269   </listitem>
270  </varlistentry>
271  <varlistentry>
272   <term><parameter>offset</parameter></term>
273   <listitem>
274    <para>
275     Offset into local configuration space
276    </para>
277   </listitem>
278  </varlistentry>
279  <varlistentry>
280   <term><parameter>data</parameter></term>
281   <listitem>
282    <para>
283     Pointer to read data into
284    </para>
285   </listitem>
286  </varlistentry>
287 </variablelist>
288</refsect1>
289<refsect1>
290<title>Description</title>
291<para>
292   Reads 16 bits of data from the specified offset within the local
293   device's configuration space.
294</para>
295</refsect1>
296</refentry>
297
298<refentry id="API-rio-local-write-config-16">
299<refentryinfo>
300 <title>LINUX</title>
301 <productname>Kernel Hackers Manual</productname>
302 <date>July 2017</date>
303</refentryinfo>
304<refmeta>
305 <refentrytitle><phrase>rio_local_write_config_16</phrase></refentrytitle>
306 <manvolnum>9</manvolnum>
307 <refmiscinfo class="version">4.1.27</refmiscinfo>
308</refmeta>
309<refnamediv>
310 <refname>rio_local_write_config_16</refname>
311 <refpurpose>
312     Write 16 bits to local configuration space
313 </refpurpose>
314</refnamediv>
315<refsynopsisdiv>
316 <title>Synopsis</title>
317  <funcsynopsis><funcprototype>
318   <funcdef>int <function>rio_local_write_config_16 </function></funcdef>
319   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
320   <paramdef>u32 <parameter>offset</parameter></paramdef>
321   <paramdef>u16 <parameter>data</parameter></paramdef>
322  </funcprototype></funcsynopsis>
323</refsynopsisdiv>
324<refsect1>
325 <title>Arguments</title>
326 <variablelist>
327  <varlistentry>
328   <term><parameter>port</parameter></term>
329   <listitem>
330    <para>
331     Master port
332    </para>
333   </listitem>
334  </varlistentry>
335  <varlistentry>
336   <term><parameter>offset</parameter></term>
337   <listitem>
338    <para>
339     Offset into local configuration space
340    </para>
341   </listitem>
342  </varlistentry>
343  <varlistentry>
344   <term><parameter>data</parameter></term>
345   <listitem>
346    <para>
347     Data to be written
348    </para>
349   </listitem>
350  </varlistentry>
351 </variablelist>
352</refsect1>
353<refsect1>
354<title>Description</title>
355<para>
356   Writes 16 bits of data to the specified offset within the local
357   device's configuration space.
358</para>
359</refsect1>
360</refentry>
361
362<refentry id="API-rio-local-read-config-8">
363<refentryinfo>
364 <title>LINUX</title>
365 <productname>Kernel Hackers Manual</productname>
366 <date>July 2017</date>
367</refentryinfo>
368<refmeta>
369 <refentrytitle><phrase>rio_local_read_config_8</phrase></refentrytitle>
370 <manvolnum>9</manvolnum>
371 <refmiscinfo class="version">4.1.27</refmiscinfo>
372</refmeta>
373<refnamediv>
374 <refname>rio_local_read_config_8</refname>
375 <refpurpose>
376     Read 8 bits from local configuration space
377 </refpurpose>
378</refnamediv>
379<refsynopsisdiv>
380 <title>Synopsis</title>
381  <funcsynopsis><funcprototype>
382   <funcdef>int <function>rio_local_read_config_8 </function></funcdef>
383   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
384   <paramdef>u32 <parameter>offset</parameter></paramdef>
385   <paramdef>u8 * <parameter>data</parameter></paramdef>
386  </funcprototype></funcsynopsis>
387</refsynopsisdiv>
388<refsect1>
389 <title>Arguments</title>
390 <variablelist>
391  <varlistentry>
392   <term><parameter>port</parameter></term>
393   <listitem>
394    <para>
395     Master port
396    </para>
397   </listitem>
398  </varlistentry>
399  <varlistentry>
400   <term><parameter>offset</parameter></term>
401   <listitem>
402    <para>
403     Offset into local configuration space
404    </para>
405   </listitem>
406  </varlistentry>
407  <varlistentry>
408   <term><parameter>data</parameter></term>
409   <listitem>
410    <para>
411     Pointer to read data into
412    </para>
413   </listitem>
414  </varlistentry>
415 </variablelist>
416</refsect1>
417<refsect1>
418<title>Description</title>
419<para>
420   Reads 8 bits of data from the specified offset within the local
421   device's configuration space.
422</para>
423</refsect1>
424</refentry>
425
426<refentry id="API-rio-local-write-config-8">
427<refentryinfo>
428 <title>LINUX</title>
429 <productname>Kernel Hackers Manual</productname>
430 <date>July 2017</date>
431</refentryinfo>
432<refmeta>
433 <refentrytitle><phrase>rio_local_write_config_8</phrase></refentrytitle>
434 <manvolnum>9</manvolnum>
435 <refmiscinfo class="version">4.1.27</refmiscinfo>
436</refmeta>
437<refnamediv>
438 <refname>rio_local_write_config_8</refname>
439 <refpurpose>
440     Write 8 bits to local configuration space
441 </refpurpose>
442</refnamediv>
443<refsynopsisdiv>
444 <title>Synopsis</title>
445  <funcsynopsis><funcprototype>
446   <funcdef>int <function>rio_local_write_config_8 </function></funcdef>
447   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
448   <paramdef>u32 <parameter>offset</parameter></paramdef>
449   <paramdef>u8 <parameter>data</parameter></paramdef>
450  </funcprototype></funcsynopsis>
451</refsynopsisdiv>
452<refsect1>
453 <title>Arguments</title>
454 <variablelist>
455  <varlistentry>
456   <term><parameter>port</parameter></term>
457   <listitem>
458    <para>
459     Master port
460    </para>
461   </listitem>
462  </varlistentry>
463  <varlistentry>
464   <term><parameter>offset</parameter></term>
465   <listitem>
466    <para>
467     Offset into local configuration space
468    </para>
469   </listitem>
470  </varlistentry>
471  <varlistentry>
472   <term><parameter>data</parameter></term>
473   <listitem>
474    <para>
475     Data to be written
476    </para>
477   </listitem>
478  </varlistentry>
479 </variablelist>
480</refsect1>
481<refsect1>
482<title>Description</title>
483<para>
484   Writes 8 bits of data to the specified offset within the local
485   device's configuration space.
486</para>
487</refsect1>
488</refentry>
489
490<refentry id="API-rio-read-config-32">
491<refentryinfo>
492 <title>LINUX</title>
493 <productname>Kernel Hackers Manual</productname>
494 <date>July 2017</date>
495</refentryinfo>
496<refmeta>
497 <refentrytitle><phrase>rio_read_config_32</phrase></refentrytitle>
498 <manvolnum>9</manvolnum>
499 <refmiscinfo class="version">4.1.27</refmiscinfo>
500</refmeta>
501<refnamediv>
502 <refname>rio_read_config_32</refname>
503 <refpurpose>
504     Read 32 bits from configuration space
505 </refpurpose>
506</refnamediv>
507<refsynopsisdiv>
508 <title>Synopsis</title>
509  <funcsynopsis><funcprototype>
510   <funcdef>int <function>rio_read_config_32 </function></funcdef>
511   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
512   <paramdef>u32 <parameter>offset</parameter></paramdef>
513   <paramdef>u32 * <parameter>data</parameter></paramdef>
514  </funcprototype></funcsynopsis>
515</refsynopsisdiv>
516<refsect1>
517 <title>Arguments</title>
518 <variablelist>
519  <varlistentry>
520   <term><parameter>rdev</parameter></term>
521   <listitem>
522    <para>
523     RIO device
524    </para>
525   </listitem>
526  </varlistentry>
527  <varlistentry>
528   <term><parameter>offset</parameter></term>
529   <listitem>
530    <para>
531     Offset into device configuration space
532    </para>
533   </listitem>
534  </varlistentry>
535  <varlistentry>
536   <term><parameter>data</parameter></term>
537   <listitem>
538    <para>
539     Pointer to read data into
540    </para>
541   </listitem>
542  </varlistentry>
543 </variablelist>
544</refsect1>
545<refsect1>
546<title>Description</title>
547<para>
548   Reads 32 bits of data from the specified offset within the
549   RIO device's configuration space.
550</para>
551</refsect1>
552</refentry>
553
554<refentry id="API-rio-write-config-32">
555<refentryinfo>
556 <title>LINUX</title>
557 <productname>Kernel Hackers Manual</productname>
558 <date>July 2017</date>
559</refentryinfo>
560<refmeta>
561 <refentrytitle><phrase>rio_write_config_32</phrase></refentrytitle>
562 <manvolnum>9</manvolnum>
563 <refmiscinfo class="version">4.1.27</refmiscinfo>
564</refmeta>
565<refnamediv>
566 <refname>rio_write_config_32</refname>
567 <refpurpose>
568     Write 32 bits to configuration space
569 </refpurpose>
570</refnamediv>
571<refsynopsisdiv>
572 <title>Synopsis</title>
573  <funcsynopsis><funcprototype>
574   <funcdef>int <function>rio_write_config_32 </function></funcdef>
575   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
576   <paramdef>u32 <parameter>offset</parameter></paramdef>
577   <paramdef>u32 <parameter>data</parameter></paramdef>
578  </funcprototype></funcsynopsis>
579</refsynopsisdiv>
580<refsect1>
581 <title>Arguments</title>
582 <variablelist>
583  <varlistentry>
584   <term><parameter>rdev</parameter></term>
585   <listitem>
586    <para>
587     RIO device
588    </para>
589   </listitem>
590  </varlistentry>
591  <varlistentry>
592   <term><parameter>offset</parameter></term>
593   <listitem>
594    <para>
595     Offset into device configuration space
596    </para>
597   </listitem>
598  </varlistentry>
599  <varlistentry>
600   <term><parameter>data</parameter></term>
601   <listitem>
602    <para>
603     Data to be written
604    </para>
605   </listitem>
606  </varlistentry>
607 </variablelist>
608</refsect1>
609<refsect1>
610<title>Description</title>
611<para>
612   Writes 32 bits of data to the specified offset within the
613   RIO device's configuration space.
614</para>
615</refsect1>
616</refentry>
617
618<refentry id="API-rio-read-config-16">
619<refentryinfo>
620 <title>LINUX</title>
621 <productname>Kernel Hackers Manual</productname>
622 <date>July 2017</date>
623</refentryinfo>
624<refmeta>
625 <refentrytitle><phrase>rio_read_config_16</phrase></refentrytitle>
626 <manvolnum>9</manvolnum>
627 <refmiscinfo class="version">4.1.27</refmiscinfo>
628</refmeta>
629<refnamediv>
630 <refname>rio_read_config_16</refname>
631 <refpurpose>
632     Read 16 bits from configuration space
633 </refpurpose>
634</refnamediv>
635<refsynopsisdiv>
636 <title>Synopsis</title>
637  <funcsynopsis><funcprototype>
638   <funcdef>int <function>rio_read_config_16 </function></funcdef>
639   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
640   <paramdef>u32 <parameter>offset</parameter></paramdef>
641   <paramdef>u16 * <parameter>data</parameter></paramdef>
642  </funcprototype></funcsynopsis>
643</refsynopsisdiv>
644<refsect1>
645 <title>Arguments</title>
646 <variablelist>
647  <varlistentry>
648   <term><parameter>rdev</parameter></term>
649   <listitem>
650    <para>
651     RIO device
652    </para>
653   </listitem>
654  </varlistentry>
655  <varlistentry>
656   <term><parameter>offset</parameter></term>
657   <listitem>
658    <para>
659     Offset into device configuration space
660    </para>
661   </listitem>
662  </varlistentry>
663  <varlistentry>
664   <term><parameter>data</parameter></term>
665   <listitem>
666    <para>
667     Pointer to read data into
668    </para>
669   </listitem>
670  </varlistentry>
671 </variablelist>
672</refsect1>
673<refsect1>
674<title>Description</title>
675<para>
676   Reads 16 bits of data from the specified offset within the
677   RIO device's configuration space.
678</para>
679</refsect1>
680</refentry>
681
682<refentry id="API-rio-write-config-16">
683<refentryinfo>
684 <title>LINUX</title>
685 <productname>Kernel Hackers Manual</productname>
686 <date>July 2017</date>
687</refentryinfo>
688<refmeta>
689 <refentrytitle><phrase>rio_write_config_16</phrase></refentrytitle>
690 <manvolnum>9</manvolnum>
691 <refmiscinfo class="version">4.1.27</refmiscinfo>
692</refmeta>
693<refnamediv>
694 <refname>rio_write_config_16</refname>
695 <refpurpose>
696     Write 16 bits to configuration space
697 </refpurpose>
698</refnamediv>
699<refsynopsisdiv>
700 <title>Synopsis</title>
701  <funcsynopsis><funcprototype>
702   <funcdef>int <function>rio_write_config_16 </function></funcdef>
703   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
704   <paramdef>u32 <parameter>offset</parameter></paramdef>
705   <paramdef>u16 <parameter>data</parameter></paramdef>
706  </funcprototype></funcsynopsis>
707</refsynopsisdiv>
708<refsect1>
709 <title>Arguments</title>
710 <variablelist>
711  <varlistentry>
712   <term><parameter>rdev</parameter></term>
713   <listitem>
714    <para>
715     RIO device
716    </para>
717   </listitem>
718  </varlistentry>
719  <varlistentry>
720   <term><parameter>offset</parameter></term>
721   <listitem>
722    <para>
723     Offset into device configuration space
724    </para>
725   </listitem>
726  </varlistentry>
727  <varlistentry>
728   <term><parameter>data</parameter></term>
729   <listitem>
730    <para>
731     Data to be written
732    </para>
733   </listitem>
734  </varlistentry>
735 </variablelist>
736</refsect1>
737<refsect1>
738<title>Description</title>
739<para>
740   Writes 16 bits of data to the specified offset within the
741   RIO device's configuration space.
742</para>
743</refsect1>
744</refentry>
745
746<refentry id="API-rio-read-config-8">
747<refentryinfo>
748 <title>LINUX</title>
749 <productname>Kernel Hackers Manual</productname>
750 <date>July 2017</date>
751</refentryinfo>
752<refmeta>
753 <refentrytitle><phrase>rio_read_config_8</phrase></refentrytitle>
754 <manvolnum>9</manvolnum>
755 <refmiscinfo class="version">4.1.27</refmiscinfo>
756</refmeta>
757<refnamediv>
758 <refname>rio_read_config_8</refname>
759 <refpurpose>
760     Read 8 bits from configuration space
761 </refpurpose>
762</refnamediv>
763<refsynopsisdiv>
764 <title>Synopsis</title>
765  <funcsynopsis><funcprototype>
766   <funcdef>int <function>rio_read_config_8 </function></funcdef>
767   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
768   <paramdef>u32 <parameter>offset</parameter></paramdef>
769   <paramdef>u8 * <parameter>data</parameter></paramdef>
770  </funcprototype></funcsynopsis>
771</refsynopsisdiv>
772<refsect1>
773 <title>Arguments</title>
774 <variablelist>
775  <varlistentry>
776   <term><parameter>rdev</parameter></term>
777   <listitem>
778    <para>
779     RIO device
780    </para>
781   </listitem>
782  </varlistentry>
783  <varlistentry>
784   <term><parameter>offset</parameter></term>
785   <listitem>
786    <para>
787     Offset into device configuration space
788    </para>
789   </listitem>
790  </varlistentry>
791  <varlistentry>
792   <term><parameter>data</parameter></term>
793   <listitem>
794    <para>
795     Pointer to read data into
796    </para>
797   </listitem>
798  </varlistentry>
799 </variablelist>
800</refsect1>
801<refsect1>
802<title>Description</title>
803<para>
804   Reads 8 bits of data from the specified offset within the
805   RIO device's configuration space.
806</para>
807</refsect1>
808</refentry>
809
810<refentry id="API-rio-write-config-8">
811<refentryinfo>
812 <title>LINUX</title>
813 <productname>Kernel Hackers Manual</productname>
814 <date>July 2017</date>
815</refentryinfo>
816<refmeta>
817 <refentrytitle><phrase>rio_write_config_8</phrase></refentrytitle>
818 <manvolnum>9</manvolnum>
819 <refmiscinfo class="version">4.1.27</refmiscinfo>
820</refmeta>
821<refnamediv>
822 <refname>rio_write_config_8</refname>
823 <refpurpose>
824     Write 8 bits to configuration space
825 </refpurpose>
826</refnamediv>
827<refsynopsisdiv>
828 <title>Synopsis</title>
829  <funcsynopsis><funcprototype>
830   <funcdef>int <function>rio_write_config_8 </function></funcdef>
831   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
832   <paramdef>u32 <parameter>offset</parameter></paramdef>
833   <paramdef>u8 <parameter>data</parameter></paramdef>
834  </funcprototype></funcsynopsis>
835</refsynopsisdiv>
836<refsect1>
837 <title>Arguments</title>
838 <variablelist>
839  <varlistentry>
840   <term><parameter>rdev</parameter></term>
841   <listitem>
842    <para>
843     RIO device
844    </para>
845   </listitem>
846  </varlistentry>
847  <varlistentry>
848   <term><parameter>offset</parameter></term>
849   <listitem>
850    <para>
851     Offset into device configuration space
852    </para>
853   </listitem>
854  </varlistentry>
855  <varlistentry>
856   <term><parameter>data</parameter></term>
857   <listitem>
858    <para>
859     Data to be written
860    </para>
861   </listitem>
862  </varlistentry>
863 </variablelist>
864</refsect1>
865<refsect1>
866<title>Description</title>
867<para>
868   Writes 8 bits of data to the specified offset within the
869   RIO device's configuration space.
870</para>
871</refsect1>
872</refentry>
873
874<refentry id="API-rio-send-doorbell">
875<refentryinfo>
876 <title>LINUX</title>
877 <productname>Kernel Hackers Manual</productname>
878 <date>July 2017</date>
879</refentryinfo>
880<refmeta>
881 <refentrytitle><phrase>rio_send_doorbell</phrase></refentrytitle>
882 <manvolnum>9</manvolnum>
883 <refmiscinfo class="version">4.1.27</refmiscinfo>
884</refmeta>
885<refnamediv>
886 <refname>rio_send_doorbell</refname>
887 <refpurpose>
888     Send a doorbell message to a device
889 </refpurpose>
890</refnamediv>
891<refsynopsisdiv>
892 <title>Synopsis</title>
893  <funcsynopsis><funcprototype>
894   <funcdef>int <function>rio_send_doorbell </function></funcdef>
895   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
896   <paramdef>u16 <parameter>data</parameter></paramdef>
897  </funcprototype></funcsynopsis>
898</refsynopsisdiv>
899<refsect1>
900 <title>Arguments</title>
901 <variablelist>
902  <varlistentry>
903   <term><parameter>rdev</parameter></term>
904   <listitem>
905    <para>
906     RIO device
907    </para>
908   </listitem>
909  </varlistentry>
910  <varlistentry>
911   <term><parameter>data</parameter></term>
912   <listitem>
913    <para>
914     Doorbell message data
915    </para>
916   </listitem>
917  </varlistentry>
918 </variablelist>
919</refsect1>
920<refsect1>
921<title>Description</title>
922<para>
923   Send a doorbell message to a RIO device. The doorbell message
924   has a 16-bit info field provided by the <parameter>data</parameter> argument.
925</para>
926</refsect1>
927</refentry>
928
929<refentry id="API-rio-init-mbox-res">
930<refentryinfo>
931 <title>LINUX</title>
932 <productname>Kernel Hackers Manual</productname>
933 <date>July 2017</date>
934</refentryinfo>
935<refmeta>
936 <refentrytitle><phrase>rio_init_mbox_res</phrase></refentrytitle>
937 <manvolnum>9</manvolnum>
938 <refmiscinfo class="version">4.1.27</refmiscinfo>
939</refmeta>
940<refnamediv>
941 <refname>rio_init_mbox_res</refname>
942 <refpurpose>
943     Initialize a RIO mailbox resource
944 </refpurpose>
945</refnamediv>
946<refsynopsisdiv>
947 <title>Synopsis</title>
948  <funcsynopsis><funcprototype>
949   <funcdef>void <function>rio_init_mbox_res </function></funcdef>
950   <paramdef>struct resource * <parameter>res</parameter></paramdef>
951   <paramdef>int <parameter>start</parameter></paramdef>
952   <paramdef>int <parameter>end</parameter></paramdef>
953  </funcprototype></funcsynopsis>
954</refsynopsisdiv>
955<refsect1>
956 <title>Arguments</title>
957 <variablelist>
958  <varlistentry>
959   <term><parameter>res</parameter></term>
960   <listitem>
961    <para>
962     resource struct
963    </para>
964   </listitem>
965  </varlistentry>
966  <varlistentry>
967   <term><parameter>start</parameter></term>
968   <listitem>
969    <para>
970     start of mailbox range
971    </para>
972   </listitem>
973  </varlistentry>
974  <varlistentry>
975   <term><parameter>end</parameter></term>
976   <listitem>
977    <para>
978     end of mailbox range
979    </para>
980   </listitem>
981  </varlistentry>
982 </variablelist>
983</refsect1>
984<refsect1>
985<title>Description</title>
986<para>
987   This function is used to initialize the fields of a resource
988   for use as a mailbox resource.  It initializes a range of
989   mailboxes using the start and end arguments.
990</para>
991</refsect1>
992</refentry>
993
994<refentry id="API-rio-init-dbell-res">
995<refentryinfo>
996 <title>LINUX</title>
997 <productname>Kernel Hackers Manual</productname>
998 <date>July 2017</date>
999</refentryinfo>
1000<refmeta>
1001 <refentrytitle><phrase>rio_init_dbell_res</phrase></refentrytitle>
1002 <manvolnum>9</manvolnum>
1003 <refmiscinfo class="version">4.1.27</refmiscinfo>
1004</refmeta>
1005<refnamediv>
1006 <refname>rio_init_dbell_res</refname>
1007 <refpurpose>
1008     Initialize a RIO doorbell resource
1009 </refpurpose>
1010</refnamediv>
1011<refsynopsisdiv>
1012 <title>Synopsis</title>
1013  <funcsynopsis><funcprototype>
1014   <funcdef>void <function>rio_init_dbell_res </function></funcdef>
1015   <paramdef>struct resource * <parameter>res</parameter></paramdef>
1016   <paramdef>u16 <parameter>start</parameter></paramdef>
1017   <paramdef>u16 <parameter>end</parameter></paramdef>
1018  </funcprototype></funcsynopsis>
1019</refsynopsisdiv>
1020<refsect1>
1021 <title>Arguments</title>
1022 <variablelist>
1023  <varlistentry>
1024   <term><parameter>res</parameter></term>
1025   <listitem>
1026    <para>
1027     resource struct
1028    </para>
1029   </listitem>
1030  </varlistentry>
1031  <varlistentry>
1032   <term><parameter>start</parameter></term>
1033   <listitem>
1034    <para>
1035     start of doorbell range
1036    </para>
1037   </listitem>
1038  </varlistentry>
1039  <varlistentry>
1040   <term><parameter>end</parameter></term>
1041   <listitem>
1042    <para>
1043     end of doorbell range
1044    </para>
1045   </listitem>
1046  </varlistentry>
1047 </variablelist>
1048</refsect1>
1049<refsect1>
1050<title>Description</title>
1051<para>
1052   This function is used to initialize the fields of a resource
1053   for use as a doorbell resource.  It initializes a range of
1054   doorbell messages using the start and end arguments.
1055</para>
1056</refsect1>
1057</refentry>
1058
1059<refentry id="API-RIO-DEVICE">
1060<refentryinfo>
1061 <title>LINUX</title>
1062 <productname>Kernel Hackers Manual</productname>
1063 <date>July 2017</date>
1064</refentryinfo>
1065<refmeta>
1066 <refentrytitle><phrase>RIO_DEVICE</phrase></refentrytitle>
1067 <manvolnum>9</manvolnum>
1068 <refmiscinfo class="version">4.1.27</refmiscinfo>
1069</refmeta>
1070<refnamediv>
1071 <refname>RIO_DEVICE</refname>
1072 <refpurpose>
1073     macro used to describe a specific RIO device
1074 </refpurpose>
1075</refnamediv>
1076<refsynopsisdiv>
1077 <title>Synopsis</title>
1078  <funcsynopsis><funcprototype>
1079   <funcdef> <function>RIO_DEVICE </function></funcdef>
1080   <paramdef> <parameter>dev</parameter></paramdef>
1081   <paramdef> <parameter>ven</parameter></paramdef>
1082  </funcprototype></funcsynopsis>
1083</refsynopsisdiv>
1084<refsect1>
1085 <title>Arguments</title>
1086 <variablelist>
1087  <varlistentry>
1088   <term><parameter>dev</parameter></term>
1089   <listitem>
1090    <para>
1091     the 16 bit RIO device ID
1092    </para>
1093   </listitem>
1094  </varlistentry>
1095  <varlistentry>
1096   <term><parameter>ven</parameter></term>
1097   <listitem>
1098    <para>
1099     the 16 bit RIO vendor ID
1100    </para>
1101   </listitem>
1102  </varlistentry>
1103 </variablelist>
1104</refsect1>
1105<refsect1>
1106<title>Description</title>
1107<para>
1108   This macro is used to create a struct rio_device_id that matches a
1109   specific device.  The assembly vendor and assembly device fields
1110   will be set to <constant>RIO_ANY_ID</constant>.
1111</para>
1112</refsect1>
1113</refentry>
1114
1115<refentry id="API-rio-add-outb-message">
1116<refentryinfo>
1117 <title>LINUX</title>
1118 <productname>Kernel Hackers Manual</productname>
1119 <date>July 2017</date>
1120</refentryinfo>
1121<refmeta>
1122 <refentrytitle><phrase>rio_add_outb_message</phrase></refentrytitle>
1123 <manvolnum>9</manvolnum>
1124 <refmiscinfo class="version">4.1.27</refmiscinfo>
1125</refmeta>
1126<refnamediv>
1127 <refname>rio_add_outb_message</refname>
1128 <refpurpose>
1129     Add RIO message to an outbound mailbox queue
1130 </refpurpose>
1131</refnamediv>
1132<refsynopsisdiv>
1133 <title>Synopsis</title>
1134  <funcsynopsis><funcprototype>
1135   <funcdef>int <function>rio_add_outb_message </function></funcdef>
1136   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
1137   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
1138   <paramdef>int <parameter>mbox</parameter></paramdef>
1139   <paramdef>void * <parameter>buffer</parameter></paramdef>
1140   <paramdef>size_t <parameter>len</parameter></paramdef>
1141  </funcprototype></funcsynopsis>
1142</refsynopsisdiv>
1143<refsect1>
1144 <title>Arguments</title>
1145 <variablelist>
1146  <varlistentry>
1147   <term><parameter>mport</parameter></term>
1148   <listitem>
1149    <para>
1150     RIO master port containing the outbound queue
1151    </para>
1152   </listitem>
1153  </varlistentry>
1154  <varlistentry>
1155   <term><parameter>rdev</parameter></term>
1156   <listitem>
1157    <para>
1158     RIO device the message is be sent to
1159    </para>
1160   </listitem>
1161  </varlistentry>
1162  <varlistentry>
1163   <term><parameter>mbox</parameter></term>
1164   <listitem>
1165    <para>
1166     The outbound mailbox queue
1167    </para>
1168   </listitem>
1169  </varlistentry>
1170  <varlistentry>
1171   <term><parameter>buffer</parameter></term>
1172   <listitem>
1173    <para>
1174     Pointer to the message buffer
1175    </para>
1176   </listitem>
1177  </varlistentry>
1178  <varlistentry>
1179   <term><parameter>len</parameter></term>
1180   <listitem>
1181    <para>
1182     Length of the message buffer
1183    </para>
1184   </listitem>
1185  </varlistentry>
1186 </variablelist>
1187</refsect1>
1188<refsect1>
1189<title>Description</title>
1190<para>
1191   Adds a RIO message buffer to an outbound mailbox queue for
1192   transmission. Returns 0 on success.
1193</para>
1194</refsect1>
1195</refentry>
1196
1197<refentry id="API-rio-add-inb-buffer">
1198<refentryinfo>
1199 <title>LINUX</title>
1200 <productname>Kernel Hackers Manual</productname>
1201 <date>July 2017</date>
1202</refentryinfo>
1203<refmeta>
1204 <refentrytitle><phrase>rio_add_inb_buffer</phrase></refentrytitle>
1205 <manvolnum>9</manvolnum>
1206 <refmiscinfo class="version">4.1.27</refmiscinfo>
1207</refmeta>
1208<refnamediv>
1209 <refname>rio_add_inb_buffer</refname>
1210 <refpurpose>
1211     Add buffer to an inbound mailbox queue
1212 </refpurpose>
1213</refnamediv>
1214<refsynopsisdiv>
1215 <title>Synopsis</title>
1216  <funcsynopsis><funcprototype>
1217   <funcdef>int <function>rio_add_inb_buffer </function></funcdef>
1218   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
1219   <paramdef>int <parameter>mbox</parameter></paramdef>
1220   <paramdef>void * <parameter>buffer</parameter></paramdef>
1221  </funcprototype></funcsynopsis>
1222</refsynopsisdiv>
1223<refsect1>
1224 <title>Arguments</title>
1225 <variablelist>
1226  <varlistentry>
1227   <term><parameter>mport</parameter></term>
1228   <listitem>
1229    <para>
1230     Master port containing the inbound mailbox
1231    </para>
1232   </listitem>
1233  </varlistentry>
1234  <varlistentry>
1235   <term><parameter>mbox</parameter></term>
1236   <listitem>
1237    <para>
1238     The inbound mailbox number
1239    </para>
1240   </listitem>
1241  </varlistentry>
1242  <varlistentry>
1243   <term><parameter>buffer</parameter></term>
1244   <listitem>
1245    <para>
1246     Pointer to the message buffer
1247    </para>
1248   </listitem>
1249  </varlistentry>
1250 </variablelist>
1251</refsect1>
1252<refsect1>
1253<title>Description</title>
1254<para>
1255   Adds a buffer to an inbound mailbox queue for reception. Returns
1256   0 on success.
1257</para>
1258</refsect1>
1259</refentry>
1260
1261<refentry id="API-rio-get-inb-message">
1262<refentryinfo>
1263 <title>LINUX</title>
1264 <productname>Kernel Hackers Manual</productname>
1265 <date>July 2017</date>
1266</refentryinfo>
1267<refmeta>
1268 <refentrytitle><phrase>rio_get_inb_message</phrase></refentrytitle>
1269 <manvolnum>9</manvolnum>
1270 <refmiscinfo class="version">4.1.27</refmiscinfo>
1271</refmeta>
1272<refnamediv>
1273 <refname>rio_get_inb_message</refname>
1274 <refpurpose>
1275     Get A RIO message from an inbound mailbox queue
1276 </refpurpose>
1277</refnamediv>
1278<refsynopsisdiv>
1279 <title>Synopsis</title>
1280  <funcsynopsis><funcprototype>
1281   <funcdef>void * <function>rio_get_inb_message </function></funcdef>
1282   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
1283   <paramdef>int <parameter>mbox</parameter></paramdef>
1284  </funcprototype></funcsynopsis>
1285</refsynopsisdiv>
1286<refsect1>
1287 <title>Arguments</title>
1288 <variablelist>
1289  <varlistentry>
1290   <term><parameter>mport</parameter></term>
1291   <listitem>
1292    <para>
1293     Master port containing the inbound mailbox
1294    </para>
1295   </listitem>
1296  </varlistentry>
1297  <varlistentry>
1298   <term><parameter>mbox</parameter></term>
1299   <listitem>
1300    <para>
1301     The inbound mailbox number
1302    </para>
1303   </listitem>
1304  </varlistentry>
1305 </variablelist>
1306</refsect1>
1307<refsect1>
1308<title>Description</title>
1309<para>
1310   Get a RIO message from an inbound mailbox queue. Returns 0 on success.
1311</para>
1312</refsect1>
1313</refentry>
1314
1315<refentry id="API-rio-name">
1316<refentryinfo>
1317 <title>LINUX</title>
1318 <productname>Kernel Hackers Manual</productname>
1319 <date>July 2017</date>
1320</refentryinfo>
1321<refmeta>
1322 <refentrytitle><phrase>rio_name</phrase></refentrytitle>
1323 <manvolnum>9</manvolnum>
1324 <refmiscinfo class="version">4.1.27</refmiscinfo>
1325</refmeta>
1326<refnamediv>
1327 <refname>rio_name</refname>
1328 <refpurpose>
1329     Get the unique RIO device identifier
1330 </refpurpose>
1331</refnamediv>
1332<refsynopsisdiv>
1333 <title>Synopsis</title>
1334  <funcsynopsis><funcprototype>
1335   <funcdef>const char * <function>rio_name </function></funcdef>
1336   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
1337  </funcprototype></funcsynopsis>
1338</refsynopsisdiv>
1339<refsect1>
1340 <title>Arguments</title>
1341 <variablelist>
1342  <varlistentry>
1343   <term><parameter>rdev</parameter></term>
1344   <listitem>
1345    <para>
1346     RIO device
1347    </para>
1348   </listitem>
1349  </varlistentry>
1350 </variablelist>
1351</refsect1>
1352<refsect1>
1353<title>Description</title>
1354<para>
1355   Get the unique RIO device identifier. Returns the device
1356   identifier string.
1357</para>
1358</refsect1>
1359</refentry>
1360
1361<refentry id="API-rio-get-drvdata">
1362<refentryinfo>
1363 <title>LINUX</title>
1364 <productname>Kernel Hackers Manual</productname>
1365 <date>July 2017</date>
1366</refentryinfo>
1367<refmeta>
1368 <refentrytitle><phrase>rio_get_drvdata</phrase></refentrytitle>
1369 <manvolnum>9</manvolnum>
1370 <refmiscinfo class="version">4.1.27</refmiscinfo>
1371</refmeta>
1372<refnamediv>
1373 <refname>rio_get_drvdata</refname>
1374 <refpurpose>
1375     Get RIO driver specific data
1376 </refpurpose>
1377</refnamediv>
1378<refsynopsisdiv>
1379 <title>Synopsis</title>
1380  <funcsynopsis><funcprototype>
1381   <funcdef>void * <function>rio_get_drvdata </function></funcdef>
1382   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
1383  </funcprototype></funcsynopsis>
1384</refsynopsisdiv>
1385<refsect1>
1386 <title>Arguments</title>
1387 <variablelist>
1388  <varlistentry>
1389   <term><parameter>rdev</parameter></term>
1390   <listitem>
1391    <para>
1392     RIO device
1393    </para>
1394   </listitem>
1395  </varlistentry>
1396 </variablelist>
1397</refsect1>
1398<refsect1>
1399<title>Description</title>
1400<para>
1401   Get RIO driver specific data. Returns a pointer to the
1402   driver specific data.
1403</para>
1404</refsect1>
1405</refentry>
1406
1407<refentry id="API-rio-set-drvdata">
1408<refentryinfo>
1409 <title>LINUX</title>
1410 <productname>Kernel Hackers Manual</productname>
1411 <date>July 2017</date>
1412</refentryinfo>
1413<refmeta>
1414 <refentrytitle><phrase>rio_set_drvdata</phrase></refentrytitle>
1415 <manvolnum>9</manvolnum>
1416 <refmiscinfo class="version">4.1.27</refmiscinfo>
1417</refmeta>
1418<refnamediv>
1419 <refname>rio_set_drvdata</refname>
1420 <refpurpose>
1421     Set RIO driver specific data
1422 </refpurpose>
1423</refnamediv>
1424<refsynopsisdiv>
1425 <title>Synopsis</title>
1426  <funcsynopsis><funcprototype>
1427   <funcdef>void <function>rio_set_drvdata </function></funcdef>
1428   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
1429   <paramdef>void * <parameter>data</parameter></paramdef>
1430  </funcprototype></funcsynopsis>
1431</refsynopsisdiv>
1432<refsect1>
1433 <title>Arguments</title>
1434 <variablelist>
1435  <varlistentry>
1436   <term><parameter>rdev</parameter></term>
1437   <listitem>
1438    <para>
1439     RIO device
1440    </para>
1441   </listitem>
1442  </varlistentry>
1443  <varlistentry>
1444   <term><parameter>data</parameter></term>
1445   <listitem>
1446    <para>
1447     Pointer to driver specific data
1448    </para>
1449   </listitem>
1450  </varlistentry>
1451 </variablelist>
1452</refsect1>
1453<refsect1>
1454<title>Description</title>
1455<para>
1456   Set RIO driver specific data. device struct driver data pointer
1457   is set to the <parameter>data</parameter> argument.
1458</para>
1459</refsect1>
1460</refentry>
1461
1462<!-- drivers/rapidio/rio-driver.c -->
1463<refentry id="API-rio-dev-get">
1464<refentryinfo>
1465 <title>LINUX</title>
1466 <productname>Kernel Hackers Manual</productname>
1467 <date>July 2017</date>
1468</refentryinfo>
1469<refmeta>
1470 <refentrytitle><phrase>rio_dev_get</phrase></refentrytitle>
1471 <manvolnum>9</manvolnum>
1472 <refmiscinfo class="version">4.1.27</refmiscinfo>
1473</refmeta>
1474<refnamediv>
1475 <refname>rio_dev_get</refname>
1476 <refpurpose>
1477  Increments the reference count of the RIO device structure
1478 </refpurpose>
1479</refnamediv>
1480<refsynopsisdiv>
1481 <title>Synopsis</title>
1482  <funcsynopsis><funcprototype>
1483   <funcdef>struct rio_dev * <function>rio_dev_get </function></funcdef>
1484   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
1485  </funcprototype></funcsynopsis>
1486</refsynopsisdiv>
1487<refsect1>
1488 <title>Arguments</title>
1489 <variablelist>
1490  <varlistentry>
1491   <term><parameter>rdev</parameter></term>
1492   <listitem>
1493    <para>
1494     RIO device being referenced
1495    </para>
1496   </listitem>
1497  </varlistentry>
1498 </variablelist>
1499</refsect1>
1500<refsect1>
1501<title>Description</title>
1502<para>
1503   Each live reference to a device should be refcounted.
1504   </para><para>
1505
1506   Drivers for RIO devices should normally record such references in
1507   their <function>probe</function> methods, when they bind to a device, and release
1508   them by calling <function>rio_dev_put</function>, in their <function>disconnect</function> methods.
1509</para>
1510</refsect1>
1511</refentry>
1512
1513<refentry id="API-rio-dev-put">
1514<refentryinfo>
1515 <title>LINUX</title>
1516 <productname>Kernel Hackers Manual</productname>
1517 <date>July 2017</date>
1518</refentryinfo>
1519<refmeta>
1520 <refentrytitle><phrase>rio_dev_put</phrase></refentrytitle>
1521 <manvolnum>9</manvolnum>
1522 <refmiscinfo class="version">4.1.27</refmiscinfo>
1523</refmeta>
1524<refnamediv>
1525 <refname>rio_dev_put</refname>
1526 <refpurpose>
1527     Release a use of the RIO device structure
1528 </refpurpose>
1529</refnamediv>
1530<refsynopsisdiv>
1531 <title>Synopsis</title>
1532  <funcsynopsis><funcprototype>
1533   <funcdef>void <function>rio_dev_put </function></funcdef>
1534   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
1535  </funcprototype></funcsynopsis>
1536</refsynopsisdiv>
1537<refsect1>
1538 <title>Arguments</title>
1539 <variablelist>
1540  <varlistentry>
1541   <term><parameter>rdev</parameter></term>
1542   <listitem>
1543    <para>
1544     RIO device being disconnected
1545    </para>
1546   </listitem>
1547  </varlistentry>
1548 </variablelist>
1549</refsect1>
1550<refsect1>
1551<title>Description</title>
1552<para>
1553   Must be called when a user of a device is finished with it.
1554   When the last user of the device calls this function, the
1555   memory of the device is freed.
1556</para>
1557</refsect1>
1558</refentry>
1559
1560<refentry id="API-rio-register-driver">
1561<refentryinfo>
1562 <title>LINUX</title>
1563 <productname>Kernel Hackers Manual</productname>
1564 <date>July 2017</date>
1565</refentryinfo>
1566<refmeta>
1567 <refentrytitle><phrase>rio_register_driver</phrase></refentrytitle>
1568 <manvolnum>9</manvolnum>
1569 <refmiscinfo class="version">4.1.27</refmiscinfo>
1570</refmeta>
1571<refnamediv>
1572 <refname>rio_register_driver</refname>
1573 <refpurpose>
1574     register a new RIO driver
1575 </refpurpose>
1576</refnamediv>
1577<refsynopsisdiv>
1578 <title>Synopsis</title>
1579  <funcsynopsis><funcprototype>
1580   <funcdef>int <function>rio_register_driver </function></funcdef>
1581   <paramdef>struct rio_driver * <parameter>rdrv</parameter></paramdef>
1582  </funcprototype></funcsynopsis>
1583</refsynopsisdiv>
1584<refsect1>
1585 <title>Arguments</title>
1586 <variablelist>
1587  <varlistentry>
1588   <term><parameter>rdrv</parameter></term>
1589   <listitem>
1590    <para>
1591     the RIO driver structure to register
1592    </para>
1593   </listitem>
1594  </varlistentry>
1595 </variablelist>
1596</refsect1>
1597<refsect1>
1598<title>Description</title>
1599<para>
1600   Adds a <structname>struct rio_driver</structname> to the list of registered drivers.
1601   Returns a negative value on error, otherwise 0. If no error
1602   occurred, the driver remains registered even if no device
1603   was claimed during registration.
1604</para>
1605</refsect1>
1606</refentry>
1607
1608<refentry id="API-rio-unregister-driver">
1609<refentryinfo>
1610 <title>LINUX</title>
1611 <productname>Kernel Hackers Manual</productname>
1612 <date>July 2017</date>
1613</refentryinfo>
1614<refmeta>
1615 <refentrytitle><phrase>rio_unregister_driver</phrase></refentrytitle>
1616 <manvolnum>9</manvolnum>
1617 <refmiscinfo class="version">4.1.27</refmiscinfo>
1618</refmeta>
1619<refnamediv>
1620 <refname>rio_unregister_driver</refname>
1621 <refpurpose>
1622     unregister a RIO driver
1623 </refpurpose>
1624</refnamediv>
1625<refsynopsisdiv>
1626 <title>Synopsis</title>
1627  <funcsynopsis><funcprototype>
1628   <funcdef>void <function>rio_unregister_driver </function></funcdef>
1629   <paramdef>struct rio_driver * <parameter>rdrv</parameter></paramdef>
1630  </funcprototype></funcsynopsis>
1631</refsynopsisdiv>
1632<refsect1>
1633 <title>Arguments</title>
1634 <variablelist>
1635  <varlistentry>
1636   <term><parameter>rdrv</parameter></term>
1637   <listitem>
1638    <para>
1639     the RIO driver structure to unregister
1640    </para>
1641   </listitem>
1642  </varlistentry>
1643 </variablelist>
1644</refsect1>
1645<refsect1>
1646<title>Description</title>
1647<para>
1648   Deletes the <structname>struct rio_driver</structname> from the list of registered RIO
1649   drivers, gives it a chance to clean up by calling its <function>remove</function>
1650   function for each device it was responsible for, and marks those
1651   devices as driverless.
1652</para>
1653</refsect1>
1654</refentry>
1655
1656<!-- drivers/rapidio/rio.c -->
1657<refentry id="API-rio-local-get-device-id">
1658<refentryinfo>
1659 <title>LINUX</title>
1660 <productname>Kernel Hackers Manual</productname>
1661 <date>July 2017</date>
1662</refentryinfo>
1663<refmeta>
1664 <refentrytitle><phrase>rio_local_get_device_id</phrase></refentrytitle>
1665 <manvolnum>9</manvolnum>
1666 <refmiscinfo class="version">4.1.27</refmiscinfo>
1667</refmeta>
1668<refnamediv>
1669 <refname>rio_local_get_device_id</refname>
1670 <refpurpose>
1671  Get the base/extended device id for a port
1672 </refpurpose>
1673</refnamediv>
1674<refsynopsisdiv>
1675 <title>Synopsis</title>
1676  <funcsynopsis><funcprototype>
1677   <funcdef>u16 <function>rio_local_get_device_id </function></funcdef>
1678   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
1679  </funcprototype></funcsynopsis>
1680</refsynopsisdiv>
1681<refsect1>
1682 <title>Arguments</title>
1683 <variablelist>
1684  <varlistentry>
1685   <term><parameter>port</parameter></term>
1686   <listitem>
1687    <para>
1688     RIO master port from which to get the deviceid
1689    </para>
1690   </listitem>
1691  </varlistentry>
1692 </variablelist>
1693</refsect1>
1694<refsect1>
1695<title>Description</title>
1696<para>
1697   Reads the base/extended device id from the local device
1698   implementing the master port. Returns the 8/16-bit device
1699   id.
1700</para>
1701</refsect1>
1702</refentry>
1703
1704<refentry id="API-rio-add-device">
1705<refentryinfo>
1706 <title>LINUX</title>
1707 <productname>Kernel Hackers Manual</productname>
1708 <date>July 2017</date>
1709</refentryinfo>
1710<refmeta>
1711 <refentrytitle><phrase>rio_add_device</phrase></refentrytitle>
1712 <manvolnum>9</manvolnum>
1713 <refmiscinfo class="version">4.1.27</refmiscinfo>
1714</refmeta>
1715<refnamediv>
1716 <refname>rio_add_device</refname>
1717 <refpurpose>
1718     Adds a RIO device to the device model
1719 </refpurpose>
1720</refnamediv>
1721<refsynopsisdiv>
1722 <title>Synopsis</title>
1723  <funcsynopsis><funcprototype>
1724   <funcdef>int <function>rio_add_device </function></funcdef>
1725   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
1726  </funcprototype></funcsynopsis>
1727</refsynopsisdiv>
1728<refsect1>
1729 <title>Arguments</title>
1730 <variablelist>
1731  <varlistentry>
1732   <term><parameter>rdev</parameter></term>
1733   <listitem>
1734    <para>
1735     RIO device
1736    </para>
1737   </listitem>
1738  </varlistentry>
1739 </variablelist>
1740</refsect1>
1741<refsect1>
1742<title>Description</title>
1743<para>
1744   Adds the RIO device to the global device list and adds the RIO
1745   device to the RIO device list.  Creates the generic sysfs nodes
1746   for an RIO device.
1747</para>
1748</refsect1>
1749</refentry>
1750
1751<refentry id="API-rio-request-inb-mbox">
1752<refentryinfo>
1753 <title>LINUX</title>
1754 <productname>Kernel Hackers Manual</productname>
1755 <date>July 2017</date>
1756</refentryinfo>
1757<refmeta>
1758 <refentrytitle><phrase>rio_request_inb_mbox</phrase></refentrytitle>
1759 <manvolnum>9</manvolnum>
1760 <refmiscinfo class="version">4.1.27</refmiscinfo>
1761</refmeta>
1762<refnamediv>
1763 <refname>rio_request_inb_mbox</refname>
1764 <refpurpose>
1765     request inbound mailbox service
1766 </refpurpose>
1767</refnamediv>
1768<refsynopsisdiv>
1769 <title>Synopsis</title>
1770  <funcsynopsis><funcprototype>
1771   <funcdef>int <function>rio_request_inb_mbox </function></funcdef>
1772   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
1773   <paramdef>void * <parameter>dev_id</parameter></paramdef>
1774   <paramdef>int <parameter>mbox</parameter></paramdef>
1775   <paramdef>int <parameter>entries</parameter></paramdef>
1776   <paramdef>void (*<parameter>minb</parameter>)
1777     <funcparams>struct rio_mport * mport, void *dev_id, int mbox, 				       int slot</funcparams></paramdef>
1778  </funcprototype></funcsynopsis>
1779</refsynopsisdiv>
1780<refsect1>
1781 <title>Arguments</title>
1782 <variablelist>
1783  <varlistentry>
1784   <term><parameter>mport</parameter></term>
1785   <listitem>
1786    <para>
1787     RIO master port from which to allocate the mailbox resource
1788    </para>
1789   </listitem>
1790  </varlistentry>
1791  <varlistentry>
1792   <term><parameter>dev_id</parameter></term>
1793   <listitem>
1794    <para>
1795     Device specific pointer to pass on event
1796    </para>
1797   </listitem>
1798  </varlistentry>
1799  <varlistentry>
1800   <term><parameter>mbox</parameter></term>
1801   <listitem>
1802    <para>
1803     Mailbox number to claim
1804    </para>
1805   </listitem>
1806  </varlistentry>
1807  <varlistentry>
1808   <term><parameter>entries</parameter></term>
1809   <listitem>
1810    <para>
1811     Number of entries in inbound mailbox queue
1812    </para>
1813   </listitem>
1814  </varlistentry>
1815  <varlistentry>
1816   <term><parameter>minb</parameter></term>
1817   <listitem>
1818    <para>
1819     Callback to execute when inbound message is received
1820    </para>
1821   </listitem>
1822  </varlistentry>
1823 </variablelist>
1824</refsect1>
1825<refsect1>
1826<title>Description</title>
1827<para>
1828   Requests ownership of an inbound mailbox resource and binds
1829   a callback function to the resource. Returns <constant>0</constant> on success.
1830</para>
1831</refsect1>
1832</refentry>
1833
1834<refentry id="API-rio-release-inb-mbox">
1835<refentryinfo>
1836 <title>LINUX</title>
1837 <productname>Kernel Hackers Manual</productname>
1838 <date>July 2017</date>
1839</refentryinfo>
1840<refmeta>
1841 <refentrytitle><phrase>rio_release_inb_mbox</phrase></refentrytitle>
1842 <manvolnum>9</manvolnum>
1843 <refmiscinfo class="version">4.1.27</refmiscinfo>
1844</refmeta>
1845<refnamediv>
1846 <refname>rio_release_inb_mbox</refname>
1847 <refpurpose>
1848     release inbound mailbox message service
1849 </refpurpose>
1850</refnamediv>
1851<refsynopsisdiv>
1852 <title>Synopsis</title>
1853  <funcsynopsis><funcprototype>
1854   <funcdef>int <function>rio_release_inb_mbox </function></funcdef>
1855   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
1856   <paramdef>int <parameter>mbox</parameter></paramdef>
1857  </funcprototype></funcsynopsis>
1858</refsynopsisdiv>
1859<refsect1>
1860 <title>Arguments</title>
1861 <variablelist>
1862  <varlistentry>
1863   <term><parameter>mport</parameter></term>
1864   <listitem>
1865    <para>
1866     RIO master port from which to release the mailbox resource
1867    </para>
1868   </listitem>
1869  </varlistentry>
1870  <varlistentry>
1871   <term><parameter>mbox</parameter></term>
1872   <listitem>
1873    <para>
1874     Mailbox number to release
1875    </para>
1876   </listitem>
1877  </varlistentry>
1878 </variablelist>
1879</refsect1>
1880<refsect1>
1881<title>Description</title>
1882<para>
1883   Releases ownership of an inbound mailbox resource. Returns 0
1884   if the request has been satisfied.
1885</para>
1886</refsect1>
1887</refentry>
1888
1889<refentry id="API-rio-request-outb-mbox">
1890<refentryinfo>
1891 <title>LINUX</title>
1892 <productname>Kernel Hackers Manual</productname>
1893 <date>July 2017</date>
1894</refentryinfo>
1895<refmeta>
1896 <refentrytitle><phrase>rio_request_outb_mbox</phrase></refentrytitle>
1897 <manvolnum>9</manvolnum>
1898 <refmiscinfo class="version">4.1.27</refmiscinfo>
1899</refmeta>
1900<refnamediv>
1901 <refname>rio_request_outb_mbox</refname>
1902 <refpurpose>
1903     request outbound mailbox service
1904 </refpurpose>
1905</refnamediv>
1906<refsynopsisdiv>
1907 <title>Synopsis</title>
1908  <funcsynopsis><funcprototype>
1909   <funcdef>int <function>rio_request_outb_mbox </function></funcdef>
1910   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
1911   <paramdef>void * <parameter>dev_id</parameter></paramdef>
1912   <paramdef>int <parameter>mbox</parameter></paramdef>
1913   <paramdef>int <parameter>entries</parameter></paramdef>
1914   <paramdef>void (*<parameter>moutb</parameter>)
1915     <funcparams>struct rio_mport * mport, void *dev_id, int mbox, int slot</funcparams></paramdef>
1916  </funcprototype></funcsynopsis>
1917</refsynopsisdiv>
1918<refsect1>
1919 <title>Arguments</title>
1920 <variablelist>
1921  <varlistentry>
1922   <term><parameter>mport</parameter></term>
1923   <listitem>
1924    <para>
1925     RIO master port from which to allocate the mailbox resource
1926    </para>
1927   </listitem>
1928  </varlistentry>
1929  <varlistentry>
1930   <term><parameter>dev_id</parameter></term>
1931   <listitem>
1932    <para>
1933     Device specific pointer to pass on event
1934    </para>
1935   </listitem>
1936  </varlistentry>
1937  <varlistentry>
1938   <term><parameter>mbox</parameter></term>
1939   <listitem>
1940    <para>
1941     Mailbox number to claim
1942    </para>
1943   </listitem>
1944  </varlistentry>
1945  <varlistentry>
1946   <term><parameter>entries</parameter></term>
1947   <listitem>
1948    <para>
1949     Number of entries in outbound mailbox queue
1950    </para>
1951   </listitem>
1952  </varlistentry>
1953  <varlistentry>
1954   <term><parameter>moutb</parameter></term>
1955   <listitem>
1956    <para>
1957     Callback to execute when outbound message is sent
1958    </para>
1959   </listitem>
1960  </varlistentry>
1961 </variablelist>
1962</refsect1>
1963<refsect1>
1964<title>Description</title>
1965<para>
1966   Requests ownership of an outbound mailbox resource and binds
1967   a callback function to the resource. Returns 0 on success.
1968</para>
1969</refsect1>
1970</refentry>
1971
1972<refentry id="API-rio-release-outb-mbox">
1973<refentryinfo>
1974 <title>LINUX</title>
1975 <productname>Kernel Hackers Manual</productname>
1976 <date>July 2017</date>
1977</refentryinfo>
1978<refmeta>
1979 <refentrytitle><phrase>rio_release_outb_mbox</phrase></refentrytitle>
1980 <manvolnum>9</manvolnum>
1981 <refmiscinfo class="version">4.1.27</refmiscinfo>
1982</refmeta>
1983<refnamediv>
1984 <refname>rio_release_outb_mbox</refname>
1985 <refpurpose>
1986     release outbound mailbox message service
1987 </refpurpose>
1988</refnamediv>
1989<refsynopsisdiv>
1990 <title>Synopsis</title>
1991  <funcsynopsis><funcprototype>
1992   <funcdef>int <function>rio_release_outb_mbox </function></funcdef>
1993   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
1994   <paramdef>int <parameter>mbox</parameter></paramdef>
1995  </funcprototype></funcsynopsis>
1996</refsynopsisdiv>
1997<refsect1>
1998 <title>Arguments</title>
1999 <variablelist>
2000  <varlistentry>
2001   <term><parameter>mport</parameter></term>
2002   <listitem>
2003    <para>
2004     RIO master port from which to release the mailbox resource
2005    </para>
2006   </listitem>
2007  </varlistentry>
2008  <varlistentry>
2009   <term><parameter>mbox</parameter></term>
2010   <listitem>
2011    <para>
2012     Mailbox number to release
2013    </para>
2014   </listitem>
2015  </varlistentry>
2016 </variablelist>
2017</refsect1>
2018<refsect1>
2019<title>Description</title>
2020<para>
2021   Releases ownership of an inbound mailbox resource. Returns 0
2022   if the request has been satisfied.
2023</para>
2024</refsect1>
2025</refentry>
2026
2027<refentry id="API-rio-request-inb-dbell">
2028<refentryinfo>
2029 <title>LINUX</title>
2030 <productname>Kernel Hackers Manual</productname>
2031 <date>July 2017</date>
2032</refentryinfo>
2033<refmeta>
2034 <refentrytitle><phrase>rio_request_inb_dbell</phrase></refentrytitle>
2035 <manvolnum>9</manvolnum>
2036 <refmiscinfo class="version">4.1.27</refmiscinfo>
2037</refmeta>
2038<refnamediv>
2039 <refname>rio_request_inb_dbell</refname>
2040 <refpurpose>
2041     request inbound doorbell message service
2042 </refpurpose>
2043</refnamediv>
2044<refsynopsisdiv>
2045 <title>Synopsis</title>
2046  <funcsynopsis><funcprototype>
2047   <funcdef>int <function>rio_request_inb_dbell </function></funcdef>
2048   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
2049   <paramdef>void * <parameter>dev_id</parameter></paramdef>
2050   <paramdef>u16 <parameter>start</parameter></paramdef>
2051   <paramdef>u16 <parameter>end</parameter></paramdef>
2052   <paramdef>void (*<parameter>dinb</parameter>)
2053     <funcparams>struct rio_mport * mport, void *dev_id, u16 src, 					u16 dst, u16 info</funcparams></paramdef>
2054  </funcprototype></funcsynopsis>
2055</refsynopsisdiv>
2056<refsect1>
2057 <title>Arguments</title>
2058 <variablelist>
2059  <varlistentry>
2060   <term><parameter>mport</parameter></term>
2061   <listitem>
2062    <para>
2063     RIO master port from which to allocate the doorbell resource
2064    </para>
2065   </listitem>
2066  </varlistentry>
2067  <varlistentry>
2068   <term><parameter>dev_id</parameter></term>
2069   <listitem>
2070    <para>
2071     Device specific pointer to pass on event
2072    </para>
2073   </listitem>
2074  </varlistentry>
2075  <varlistentry>
2076   <term><parameter>start</parameter></term>
2077   <listitem>
2078    <para>
2079     Doorbell info range start
2080    </para>
2081   </listitem>
2082  </varlistentry>
2083  <varlistentry>
2084   <term><parameter>end</parameter></term>
2085   <listitem>
2086    <para>
2087     Doorbell info range end
2088    </para>
2089   </listitem>
2090  </varlistentry>
2091  <varlistentry>
2092   <term><parameter>dinb</parameter></term>
2093   <listitem>
2094    <para>
2095     Callback to execute when doorbell is received
2096    </para>
2097   </listitem>
2098  </varlistentry>
2099 </variablelist>
2100</refsect1>
2101<refsect1>
2102<title>Description</title>
2103<para>
2104   Requests ownership of an inbound doorbell resource and binds
2105   a callback function to the resource. Returns 0 if the request
2106   has been satisfied.
2107</para>
2108</refsect1>
2109</refentry>
2110
2111<refentry id="API-rio-release-inb-dbell">
2112<refentryinfo>
2113 <title>LINUX</title>
2114 <productname>Kernel Hackers Manual</productname>
2115 <date>July 2017</date>
2116</refentryinfo>
2117<refmeta>
2118 <refentrytitle><phrase>rio_release_inb_dbell</phrase></refentrytitle>
2119 <manvolnum>9</manvolnum>
2120 <refmiscinfo class="version">4.1.27</refmiscinfo>
2121</refmeta>
2122<refnamediv>
2123 <refname>rio_release_inb_dbell</refname>
2124 <refpurpose>
2125     release inbound doorbell message service
2126 </refpurpose>
2127</refnamediv>
2128<refsynopsisdiv>
2129 <title>Synopsis</title>
2130  <funcsynopsis><funcprototype>
2131   <funcdef>int <function>rio_release_inb_dbell </function></funcdef>
2132   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
2133   <paramdef>u16 <parameter>start</parameter></paramdef>
2134   <paramdef>u16 <parameter>end</parameter></paramdef>
2135  </funcprototype></funcsynopsis>
2136</refsynopsisdiv>
2137<refsect1>
2138 <title>Arguments</title>
2139 <variablelist>
2140  <varlistentry>
2141   <term><parameter>mport</parameter></term>
2142   <listitem>
2143    <para>
2144     RIO master port from which to release the doorbell resource
2145    </para>
2146   </listitem>
2147  </varlistentry>
2148  <varlistentry>
2149   <term><parameter>start</parameter></term>
2150   <listitem>
2151    <para>
2152     Doorbell info range start
2153    </para>
2154   </listitem>
2155  </varlistentry>
2156  <varlistentry>
2157   <term><parameter>end</parameter></term>
2158   <listitem>
2159    <para>
2160     Doorbell info range end
2161    </para>
2162   </listitem>
2163  </varlistentry>
2164 </variablelist>
2165</refsect1>
2166<refsect1>
2167<title>Description</title>
2168<para>
2169   Releases ownership of an inbound doorbell resource and removes
2170   callback from the doorbell event list. Returns 0 if the request
2171   has been satisfied.
2172</para>
2173</refsect1>
2174</refentry>
2175
2176<refentry id="API-rio-request-outb-dbell">
2177<refentryinfo>
2178 <title>LINUX</title>
2179 <productname>Kernel Hackers Manual</productname>
2180 <date>July 2017</date>
2181</refentryinfo>
2182<refmeta>
2183 <refentrytitle><phrase>rio_request_outb_dbell</phrase></refentrytitle>
2184 <manvolnum>9</manvolnum>
2185 <refmiscinfo class="version">4.1.27</refmiscinfo>
2186</refmeta>
2187<refnamediv>
2188 <refname>rio_request_outb_dbell</refname>
2189 <refpurpose>
2190     request outbound doorbell message range
2191 </refpurpose>
2192</refnamediv>
2193<refsynopsisdiv>
2194 <title>Synopsis</title>
2195  <funcsynopsis><funcprototype>
2196   <funcdef>struct resource * <function>rio_request_outb_dbell </function></funcdef>
2197   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
2198   <paramdef>u16 <parameter>start</parameter></paramdef>
2199   <paramdef>u16 <parameter>end</parameter></paramdef>
2200  </funcprototype></funcsynopsis>
2201</refsynopsisdiv>
2202<refsect1>
2203 <title>Arguments</title>
2204 <variablelist>
2205  <varlistentry>
2206   <term><parameter>rdev</parameter></term>
2207   <listitem>
2208    <para>
2209     RIO device from which to allocate the doorbell resource
2210    </para>
2211   </listitem>
2212  </varlistentry>
2213  <varlistentry>
2214   <term><parameter>start</parameter></term>
2215   <listitem>
2216    <para>
2217     Doorbell message range start
2218    </para>
2219   </listitem>
2220  </varlistentry>
2221  <varlistentry>
2222   <term><parameter>end</parameter></term>
2223   <listitem>
2224    <para>
2225     Doorbell message range end
2226    </para>
2227   </listitem>
2228  </varlistentry>
2229 </variablelist>
2230</refsect1>
2231<refsect1>
2232<title>Description</title>
2233<para>
2234   Requests ownership of a doorbell message range. Returns a resource
2235   if the request has been satisfied or <constant>NULL</constant> on failure.
2236</para>
2237</refsect1>
2238</refentry>
2239
2240<refentry id="API-rio-release-outb-dbell">
2241<refentryinfo>
2242 <title>LINUX</title>
2243 <productname>Kernel Hackers Manual</productname>
2244 <date>July 2017</date>
2245</refentryinfo>
2246<refmeta>
2247 <refentrytitle><phrase>rio_release_outb_dbell</phrase></refentrytitle>
2248 <manvolnum>9</manvolnum>
2249 <refmiscinfo class="version">4.1.27</refmiscinfo>
2250</refmeta>
2251<refnamediv>
2252 <refname>rio_release_outb_dbell</refname>
2253 <refpurpose>
2254     release outbound doorbell message range
2255 </refpurpose>
2256</refnamediv>
2257<refsynopsisdiv>
2258 <title>Synopsis</title>
2259  <funcsynopsis><funcprototype>
2260   <funcdef>int <function>rio_release_outb_dbell </function></funcdef>
2261   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
2262   <paramdef>struct resource * <parameter>res</parameter></paramdef>
2263  </funcprototype></funcsynopsis>
2264</refsynopsisdiv>
2265<refsect1>
2266 <title>Arguments</title>
2267 <variablelist>
2268  <varlistentry>
2269   <term><parameter>rdev</parameter></term>
2270   <listitem>
2271    <para>
2272     RIO device from which to release the doorbell resource
2273    </para>
2274   </listitem>
2275  </varlistentry>
2276  <varlistentry>
2277   <term><parameter>res</parameter></term>
2278   <listitem>
2279    <para>
2280     Doorbell resource to be freed
2281    </para>
2282   </listitem>
2283  </varlistentry>
2284 </variablelist>
2285</refsect1>
2286<refsect1>
2287<title>Description</title>
2288<para>
2289   Releases ownership of a doorbell message range. Returns 0 if the
2290   request has been satisfied.
2291</para>
2292</refsect1>
2293</refentry>
2294
2295<refentry id="API-rio-request-inb-pwrite">
2296<refentryinfo>
2297 <title>LINUX</title>
2298 <productname>Kernel Hackers Manual</productname>
2299 <date>July 2017</date>
2300</refentryinfo>
2301<refmeta>
2302 <refentrytitle><phrase>rio_request_inb_pwrite</phrase></refentrytitle>
2303 <manvolnum>9</manvolnum>
2304 <refmiscinfo class="version">4.1.27</refmiscinfo>
2305</refmeta>
2306<refnamediv>
2307 <refname>rio_request_inb_pwrite</refname>
2308 <refpurpose>
2309     request inbound port-write message service
2310 </refpurpose>
2311</refnamediv>
2312<refsynopsisdiv>
2313 <title>Synopsis</title>
2314  <funcsynopsis><funcprototype>
2315   <funcdef>int <function>rio_request_inb_pwrite </function></funcdef>
2316   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
2317   <paramdef>int (*<parameter>pwcback</parameter>)
2318     <funcparams>struct rio_dev *rdev, union rio_pw_msg *msg, int step</funcparams></paramdef>
2319  </funcprototype></funcsynopsis>
2320</refsynopsisdiv>
2321<refsect1>
2322 <title>Arguments</title>
2323 <variablelist>
2324  <varlistentry>
2325   <term><parameter>rdev</parameter></term>
2326   <listitem>
2327    <para>
2328     RIO device to which register inbound port-write callback routine
2329    </para>
2330   </listitem>
2331  </varlistentry>
2332  <varlistentry>
2333   <term><parameter>pwcback</parameter></term>
2334   <listitem>
2335    <para>
2336     Callback routine to execute when port-write is received
2337    </para>
2338   </listitem>
2339  </varlistentry>
2340 </variablelist>
2341</refsect1>
2342<refsect1>
2343<title>Description</title>
2344<para>
2345   Binds a port-write callback function to the RapidIO device.
2346   Returns 0 if the request has been satisfied.
2347</para>
2348</refsect1>
2349</refentry>
2350
2351<refentry id="API-rio-release-inb-pwrite">
2352<refentryinfo>
2353 <title>LINUX</title>
2354 <productname>Kernel Hackers Manual</productname>
2355 <date>July 2017</date>
2356</refentryinfo>
2357<refmeta>
2358 <refentrytitle><phrase>rio_release_inb_pwrite</phrase></refentrytitle>
2359 <manvolnum>9</manvolnum>
2360 <refmiscinfo class="version">4.1.27</refmiscinfo>
2361</refmeta>
2362<refnamediv>
2363 <refname>rio_release_inb_pwrite</refname>
2364 <refpurpose>
2365     release inbound port-write message service
2366 </refpurpose>
2367</refnamediv>
2368<refsynopsisdiv>
2369 <title>Synopsis</title>
2370  <funcsynopsis><funcprototype>
2371   <funcdef>int <function>rio_release_inb_pwrite </function></funcdef>
2372   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
2373  </funcprototype></funcsynopsis>
2374</refsynopsisdiv>
2375<refsect1>
2376 <title>Arguments</title>
2377 <variablelist>
2378  <varlistentry>
2379   <term><parameter>rdev</parameter></term>
2380   <listitem>
2381    <para>
2382     RIO device which registered for inbound port-write callback
2383    </para>
2384   </listitem>
2385  </varlistentry>
2386 </variablelist>
2387</refsect1>
2388<refsect1>
2389<title>Description</title>
2390<para>
2391   Removes callback from the rio_dev structure. Returns 0 if the request
2392   has been satisfied.
2393</para>
2394</refsect1>
2395</refentry>
2396
2397<refentry id="API-rio-map-inb-region">
2398<refentryinfo>
2399 <title>LINUX</title>
2400 <productname>Kernel Hackers Manual</productname>
2401 <date>July 2017</date>
2402</refentryinfo>
2403<refmeta>
2404 <refentrytitle><phrase>rio_map_inb_region</phrase></refentrytitle>
2405 <manvolnum>9</manvolnum>
2406 <refmiscinfo class="version">4.1.27</refmiscinfo>
2407</refmeta>
2408<refnamediv>
2409 <refname>rio_map_inb_region</refname>
2410 <refpurpose>
2411     - Map inbound memory region.
2412 </refpurpose>
2413</refnamediv>
2414<refsynopsisdiv>
2415 <title>Synopsis</title>
2416  <funcsynopsis><funcprototype>
2417   <funcdef>int <function>rio_map_inb_region </function></funcdef>
2418   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
2419   <paramdef>dma_addr_t <parameter>local</parameter></paramdef>
2420   <paramdef>u64 <parameter>rbase</parameter></paramdef>
2421   <paramdef>u32 <parameter>size</parameter></paramdef>
2422   <paramdef>u32 <parameter>rflags</parameter></paramdef>
2423  </funcprototype></funcsynopsis>
2424</refsynopsisdiv>
2425<refsect1>
2426 <title>Arguments</title>
2427 <variablelist>
2428  <varlistentry>
2429   <term><parameter>mport</parameter></term>
2430   <listitem>
2431    <para>
2432     Master port.
2433    </para>
2434   </listitem>
2435  </varlistentry>
2436  <varlistentry>
2437   <term><parameter>local</parameter></term>
2438   <listitem>
2439    <para>
2440     physical address of memory region to be mapped
2441    </para>
2442   </listitem>
2443  </varlistentry>
2444  <varlistentry>
2445   <term><parameter>rbase</parameter></term>
2446   <listitem>
2447    <para>
2448     RIO base address assigned to this window
2449    </para>
2450   </listitem>
2451  </varlistentry>
2452  <varlistentry>
2453   <term><parameter>size</parameter></term>
2454   <listitem>
2455    <para>
2456     Size of the memory region
2457    </para>
2458   </listitem>
2459  </varlistentry>
2460  <varlistentry>
2461   <term><parameter>rflags</parameter></term>
2462   <listitem>
2463    <para>
2464     Flags for mapping.
2465    </para>
2466   </listitem>
2467  </varlistentry>
2468 </variablelist>
2469</refsect1>
2470<refsect1>
2471<title>Return</title>
2472<para>
2473   0 -- Success.
2474   </para><para>
2475
2476   This function will create the mapping from RIO space to local memory.
2477</para>
2478</refsect1>
2479</refentry>
2480
2481<refentry id="API-rio-unmap-inb-region">
2482<refentryinfo>
2483 <title>LINUX</title>
2484 <productname>Kernel Hackers Manual</productname>
2485 <date>July 2017</date>
2486</refentryinfo>
2487<refmeta>
2488 <refentrytitle><phrase>rio_unmap_inb_region</phrase></refentrytitle>
2489 <manvolnum>9</manvolnum>
2490 <refmiscinfo class="version">4.1.27</refmiscinfo>
2491</refmeta>
2492<refnamediv>
2493 <refname>rio_unmap_inb_region</refname>
2494 <refpurpose>
2495     - Unmap the inbound memory region
2496 </refpurpose>
2497</refnamediv>
2498<refsynopsisdiv>
2499 <title>Synopsis</title>
2500  <funcsynopsis><funcprototype>
2501   <funcdef>void <function>rio_unmap_inb_region </function></funcdef>
2502   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
2503   <paramdef>dma_addr_t <parameter>lstart</parameter></paramdef>
2504  </funcprototype></funcsynopsis>
2505</refsynopsisdiv>
2506<refsect1>
2507 <title>Arguments</title>
2508 <variablelist>
2509  <varlistentry>
2510   <term><parameter>mport</parameter></term>
2511   <listitem>
2512    <para>
2513     Master port
2514    </para>
2515   </listitem>
2516  </varlistentry>
2517  <varlistentry>
2518   <term><parameter>lstart</parameter></term>
2519   <listitem>
2520    <para>
2521     physical address of memory region to be unmapped
2522    </para>
2523   </listitem>
2524  </varlistentry>
2525 </variablelist>
2526</refsect1>
2527</refentry>
2528
2529<refentry id="API-rio-mport-get-physefb">
2530<refentryinfo>
2531 <title>LINUX</title>
2532 <productname>Kernel Hackers Manual</productname>
2533 <date>July 2017</date>
2534</refentryinfo>
2535<refmeta>
2536 <refentrytitle><phrase>rio_mport_get_physefb</phrase></refentrytitle>
2537 <manvolnum>9</manvolnum>
2538 <refmiscinfo class="version">4.1.27</refmiscinfo>
2539</refmeta>
2540<refnamediv>
2541 <refname>rio_mport_get_physefb</refname>
2542 <refpurpose>
2543     Helper function that returns register offset for Physical Layer Extended Features Block.
2544 </refpurpose>
2545</refnamediv>
2546<refsynopsisdiv>
2547 <title>Synopsis</title>
2548  <funcsynopsis><funcprototype>
2549   <funcdef>u32 <function>rio_mport_get_physefb </function></funcdef>
2550   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
2551   <paramdef>int <parameter>local</parameter></paramdef>
2552   <paramdef>u16 <parameter>destid</parameter></paramdef>
2553   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
2554  </funcprototype></funcsynopsis>
2555</refsynopsisdiv>
2556<refsect1>
2557 <title>Arguments</title>
2558 <variablelist>
2559  <varlistentry>
2560   <term><parameter>port</parameter></term>
2561   <listitem>
2562    <para>
2563     Master port to issue transaction
2564    </para>
2565   </listitem>
2566  </varlistentry>
2567  <varlistentry>
2568   <term><parameter>local</parameter></term>
2569   <listitem>
2570    <para>
2571     Indicate a local master port or remote device access
2572    </para>
2573   </listitem>
2574  </varlistentry>
2575  <varlistentry>
2576   <term><parameter>destid</parameter></term>
2577   <listitem>
2578    <para>
2579     Destination ID of the device
2580    </para>
2581   </listitem>
2582  </varlistentry>
2583  <varlistentry>
2584   <term><parameter>hopcount</parameter></term>
2585   <listitem>
2586    <para>
2587     Number of switch hops to the device
2588    </para>
2589   </listitem>
2590  </varlistentry>
2591 </variablelist>
2592</refsect1>
2593</refentry>
2594
2595<refentry id="API-rio-get-comptag">
2596<refentryinfo>
2597 <title>LINUX</title>
2598 <productname>Kernel Hackers Manual</productname>
2599 <date>July 2017</date>
2600</refentryinfo>
2601<refmeta>
2602 <refentrytitle><phrase>rio_get_comptag</phrase></refentrytitle>
2603 <manvolnum>9</manvolnum>
2604 <refmiscinfo class="version">4.1.27</refmiscinfo>
2605</refmeta>
2606<refnamediv>
2607 <refname>rio_get_comptag</refname>
2608 <refpurpose>
2609     Begin or continue searching for a RIO device by component tag
2610 </refpurpose>
2611</refnamediv>
2612<refsynopsisdiv>
2613 <title>Synopsis</title>
2614  <funcsynopsis><funcprototype>
2615   <funcdef>struct rio_dev * <function>rio_get_comptag </function></funcdef>
2616   <paramdef>u32 <parameter>comp_tag</parameter></paramdef>
2617   <paramdef>struct rio_dev * <parameter>from</parameter></paramdef>
2618  </funcprototype></funcsynopsis>
2619</refsynopsisdiv>
2620<refsect1>
2621 <title>Arguments</title>
2622 <variablelist>
2623  <varlistentry>
2624   <term><parameter>comp_tag</parameter></term>
2625   <listitem>
2626    <para>
2627     RIO component tag to match
2628    </para>
2629   </listitem>
2630  </varlistentry>
2631  <varlistentry>
2632   <term><parameter>from</parameter></term>
2633   <listitem>
2634    <para>
2635     Previous RIO device found in search, or <constant>NULL</constant> for new search
2636    </para>
2637   </listitem>
2638  </varlistentry>
2639 </variablelist>
2640</refsect1>
2641<refsect1>
2642<title>Description</title>
2643<para>
2644   Iterates through the list of known RIO devices. If a RIO device is
2645   found with a matching <parameter>comp_tag</parameter>, a pointer to its device
2646   structure is returned. Otherwise, <constant>NULL</constant> is returned. A new search
2647   is initiated by passing <constant>NULL</constant> to the <parameter>from</parameter> argument. Otherwise, if
2648   <parameter>from</parameter> is not <constant>NULL</constant>, searches continue from next device on the global
2649   list.
2650</para>
2651</refsect1>
2652</refentry>
2653
2654<refentry id="API-rio-set-port-lockout">
2655<refentryinfo>
2656 <title>LINUX</title>
2657 <productname>Kernel Hackers Manual</productname>
2658 <date>July 2017</date>
2659</refentryinfo>
2660<refmeta>
2661 <refentrytitle><phrase>rio_set_port_lockout</phrase></refentrytitle>
2662 <manvolnum>9</manvolnum>
2663 <refmiscinfo class="version">4.1.27</refmiscinfo>
2664</refmeta>
2665<refnamediv>
2666 <refname>rio_set_port_lockout</refname>
2667 <refpurpose>
2668     Sets/clears LOCKOUT bit (RIO EM 1.3) for a switch port.
2669 </refpurpose>
2670</refnamediv>
2671<refsynopsisdiv>
2672 <title>Synopsis</title>
2673  <funcsynopsis><funcprototype>
2674   <funcdef>int <function>rio_set_port_lockout </function></funcdef>
2675   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
2676   <paramdef>u32 <parameter>pnum</parameter></paramdef>
2677   <paramdef>int <parameter>lock</parameter></paramdef>
2678  </funcprototype></funcsynopsis>
2679</refsynopsisdiv>
2680<refsect1>
2681 <title>Arguments</title>
2682 <variablelist>
2683  <varlistentry>
2684   <term><parameter>rdev</parameter></term>
2685   <listitem>
2686    <para>
2687     Pointer to RIO device control structure
2688    </para>
2689   </listitem>
2690  </varlistentry>
2691  <varlistentry>
2692   <term><parameter>pnum</parameter></term>
2693   <listitem>
2694    <para>
2695     Switch port number to set LOCKOUT bit
2696    </para>
2697   </listitem>
2698  </varlistentry>
2699  <varlistentry>
2700   <term><parameter>lock</parameter></term>
2701   <listitem>
2702    <para>
2703     Operation : set (=1) or clear (=0)
2704    </para>
2705   </listitem>
2706  </varlistentry>
2707 </variablelist>
2708</refsect1>
2709</refentry>
2710
2711<refentry id="API-rio-enable-rx-tx-port">
2712<refentryinfo>
2713 <title>LINUX</title>
2714 <productname>Kernel Hackers Manual</productname>
2715 <date>July 2017</date>
2716</refentryinfo>
2717<refmeta>
2718 <refentrytitle><phrase>rio_enable_rx_tx_port</phrase></refentrytitle>
2719 <manvolnum>9</manvolnum>
2720 <refmiscinfo class="version">4.1.27</refmiscinfo>
2721</refmeta>
2722<refnamediv>
2723 <refname>rio_enable_rx_tx_port</refname>
2724 <refpurpose>
2725     enable input receiver and output transmitter of given port
2726 </refpurpose>
2727</refnamediv>
2728<refsynopsisdiv>
2729 <title>Synopsis</title>
2730  <funcsynopsis><funcprototype>
2731   <funcdef>int <function>rio_enable_rx_tx_port </function></funcdef>
2732   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
2733   <paramdef>int <parameter>local</parameter></paramdef>
2734   <paramdef>u16 <parameter>destid</parameter></paramdef>
2735   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
2736   <paramdef>u8 <parameter>port_num</parameter></paramdef>
2737  </funcprototype></funcsynopsis>
2738</refsynopsisdiv>
2739<refsect1>
2740 <title>Arguments</title>
2741 <variablelist>
2742  <varlistentry>
2743   <term><parameter>port</parameter></term>
2744   <listitem>
2745    <para>
2746     Master port associated with the RIO network
2747    </para>
2748   </listitem>
2749  </varlistentry>
2750  <varlistentry>
2751   <term><parameter>local</parameter></term>
2752   <listitem>
2753    <para>
2754     local=1 select local port otherwise a far device is reached
2755    </para>
2756   </listitem>
2757  </varlistentry>
2758  <varlistentry>
2759   <term><parameter>destid</parameter></term>
2760   <listitem>
2761    <para>
2762     Destination ID of the device to check host bit
2763    </para>
2764   </listitem>
2765  </varlistentry>
2766  <varlistentry>
2767   <term><parameter>hopcount</parameter></term>
2768   <listitem>
2769    <para>
2770     Number of hops to reach the target
2771    </para>
2772   </listitem>
2773  </varlistentry>
2774  <varlistentry>
2775   <term><parameter>port_num</parameter></term>
2776   <listitem>
2777    <para>
2778     Port (-number on switch) to enable on a far end device
2779    </para>
2780   </listitem>
2781  </varlistentry>
2782 </variablelist>
2783</refsect1>
2784<refsect1>
2785<title>Description</title>
2786<para>
2787   Returns 0 or 1 from on General Control Command and Status Register
2788   (EXT_PTR+0x3C)
2789</para>
2790</refsect1>
2791</refentry>
2792
2793<refentry id="API-rio-mport-chk-dev-access">
2794<refentryinfo>
2795 <title>LINUX</title>
2796 <productname>Kernel Hackers Manual</productname>
2797 <date>July 2017</date>
2798</refentryinfo>
2799<refmeta>
2800 <refentrytitle><phrase>rio_mport_chk_dev_access</phrase></refentrytitle>
2801 <manvolnum>9</manvolnum>
2802 <refmiscinfo class="version">4.1.27</refmiscinfo>
2803</refmeta>
2804<refnamediv>
2805 <refname>rio_mport_chk_dev_access</refname>
2806 <refpurpose>
2807     Validate access to the specified device.
2808 </refpurpose>
2809</refnamediv>
2810<refsynopsisdiv>
2811 <title>Synopsis</title>
2812  <funcsynopsis><funcprototype>
2813   <funcdef>int <function>rio_mport_chk_dev_access </function></funcdef>
2814   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
2815   <paramdef>u16 <parameter>destid</parameter></paramdef>
2816   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
2817  </funcprototype></funcsynopsis>
2818</refsynopsisdiv>
2819<refsect1>
2820 <title>Arguments</title>
2821 <variablelist>
2822  <varlistentry>
2823   <term><parameter>mport</parameter></term>
2824   <listitem>
2825    <para>
2826     Master port to send transactions
2827    </para>
2828   </listitem>
2829  </varlistentry>
2830  <varlistentry>
2831   <term><parameter>destid</parameter></term>
2832   <listitem>
2833    <para>
2834     Device destination ID in network
2835    </para>
2836   </listitem>
2837  </varlistentry>
2838  <varlistentry>
2839   <term><parameter>hopcount</parameter></term>
2840   <listitem>
2841    <para>
2842     Number of hops into the network
2843    </para>
2844   </listitem>
2845  </varlistentry>
2846 </variablelist>
2847</refsect1>
2848</refentry>
2849
2850<refentry id="API-rio-inb-pwrite-handler">
2851<refentryinfo>
2852 <title>LINUX</title>
2853 <productname>Kernel Hackers Manual</productname>
2854 <date>July 2017</date>
2855</refentryinfo>
2856<refmeta>
2857 <refentrytitle><phrase>rio_inb_pwrite_handler</phrase></refentrytitle>
2858 <manvolnum>9</manvolnum>
2859 <refmiscinfo class="version">4.1.27</refmiscinfo>
2860</refmeta>
2861<refnamediv>
2862 <refname>rio_inb_pwrite_handler</refname>
2863 <refpurpose>
2864     process inbound port-write message
2865 </refpurpose>
2866</refnamediv>
2867<refsynopsisdiv>
2868 <title>Synopsis</title>
2869  <funcsynopsis><funcprototype>
2870   <funcdef>int <function>rio_inb_pwrite_handler </function></funcdef>
2871   <paramdef>union rio_pw_msg * <parameter>pw_msg</parameter></paramdef>
2872  </funcprototype></funcsynopsis>
2873</refsynopsisdiv>
2874<refsect1>
2875 <title>Arguments</title>
2876 <variablelist>
2877  <varlistentry>
2878   <term><parameter>pw_msg</parameter></term>
2879   <listitem>
2880    <para>
2881     pointer to inbound port-write message
2882    </para>
2883   </listitem>
2884  </varlistentry>
2885 </variablelist>
2886</refsect1>
2887<refsect1>
2888<title>Description</title>
2889<para>
2890   Processes an inbound port-write message. Returns 0 if the request
2891   has been satisfied.
2892</para>
2893</refsect1>
2894</refentry>
2895
2896<refentry id="API-rio-mport-get-efb">
2897<refentryinfo>
2898 <title>LINUX</title>
2899 <productname>Kernel Hackers Manual</productname>
2900 <date>July 2017</date>
2901</refentryinfo>
2902<refmeta>
2903 <refentrytitle><phrase>rio_mport_get_efb</phrase></refentrytitle>
2904 <manvolnum>9</manvolnum>
2905 <refmiscinfo class="version">4.1.27</refmiscinfo>
2906</refmeta>
2907<refnamediv>
2908 <refname>rio_mport_get_efb</refname>
2909 <refpurpose>
2910     get pointer to next extended features block
2911 </refpurpose>
2912</refnamediv>
2913<refsynopsisdiv>
2914 <title>Synopsis</title>
2915  <funcsynopsis><funcprototype>
2916   <funcdef>u32 <function>rio_mport_get_efb </function></funcdef>
2917   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
2918   <paramdef>int <parameter>local</parameter></paramdef>
2919   <paramdef>u16 <parameter>destid</parameter></paramdef>
2920   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
2921   <paramdef>u32 <parameter>from</parameter></paramdef>
2922  </funcprototype></funcsynopsis>
2923</refsynopsisdiv>
2924<refsect1>
2925 <title>Arguments</title>
2926 <variablelist>
2927  <varlistentry>
2928   <term><parameter>port</parameter></term>
2929   <listitem>
2930    <para>
2931     Master port to issue transaction
2932    </para>
2933   </listitem>
2934  </varlistentry>
2935  <varlistentry>
2936   <term><parameter>local</parameter></term>
2937   <listitem>
2938    <para>
2939     Indicate a local master port or remote device access
2940    </para>
2941   </listitem>
2942  </varlistentry>
2943  <varlistentry>
2944   <term><parameter>destid</parameter></term>
2945   <listitem>
2946    <para>
2947     Destination ID of the device
2948    </para>
2949   </listitem>
2950  </varlistentry>
2951  <varlistentry>
2952   <term><parameter>hopcount</parameter></term>
2953   <listitem>
2954    <para>
2955     Number of switch hops to the device
2956    </para>
2957   </listitem>
2958  </varlistentry>
2959  <varlistentry>
2960   <term><parameter>from</parameter></term>
2961   <listitem>
2962    <para>
2963     Offset of  current Extended Feature block header (if 0 starts
2964     from	ExtFeaturePtr)
2965    </para>
2966   </listitem>
2967  </varlistentry>
2968 </variablelist>
2969</refsect1>
2970</refentry>
2971
2972<refentry id="API-rio-mport-get-feature">
2973<refentryinfo>
2974 <title>LINUX</title>
2975 <productname>Kernel Hackers Manual</productname>
2976 <date>July 2017</date>
2977</refentryinfo>
2978<refmeta>
2979 <refentrytitle><phrase>rio_mport_get_feature</phrase></refentrytitle>
2980 <manvolnum>9</manvolnum>
2981 <refmiscinfo class="version">4.1.27</refmiscinfo>
2982</refmeta>
2983<refnamediv>
2984 <refname>rio_mport_get_feature</refname>
2985 <refpurpose>
2986     query for devices' extended features
2987 </refpurpose>
2988</refnamediv>
2989<refsynopsisdiv>
2990 <title>Synopsis</title>
2991  <funcsynopsis><funcprototype>
2992   <funcdef>u32 <function>rio_mport_get_feature </function></funcdef>
2993   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
2994   <paramdef>int <parameter>local</parameter></paramdef>
2995   <paramdef>u16 <parameter>destid</parameter></paramdef>
2996   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
2997   <paramdef>int <parameter>ftr</parameter></paramdef>
2998  </funcprototype></funcsynopsis>
2999</refsynopsisdiv>
3000<refsect1>
3001 <title>Arguments</title>
3002 <variablelist>
3003  <varlistentry>
3004   <term><parameter>port</parameter></term>
3005   <listitem>
3006    <para>
3007     Master port to issue transaction
3008    </para>
3009   </listitem>
3010  </varlistentry>
3011  <varlistentry>
3012   <term><parameter>local</parameter></term>
3013   <listitem>
3014    <para>
3015     Indicate a local master port or remote device access
3016    </para>
3017   </listitem>
3018  </varlistentry>
3019  <varlistentry>
3020   <term><parameter>destid</parameter></term>
3021   <listitem>
3022    <para>
3023     Destination ID of the device
3024    </para>
3025   </listitem>
3026  </varlistentry>
3027  <varlistentry>
3028   <term><parameter>hopcount</parameter></term>
3029   <listitem>
3030    <para>
3031     Number of switch hops to the device
3032    </para>
3033   </listitem>
3034  </varlistentry>
3035  <varlistentry>
3036   <term><parameter>ftr</parameter></term>
3037   <listitem>
3038    <para>
3039     Extended feature code
3040    </para>
3041   </listitem>
3042  </varlistentry>
3043 </variablelist>
3044</refsect1>
3045<refsect1>
3046<title>Description</title>
3047<para>
3048   Tell if a device supports a given RapidIO capability.
3049   Returns the offset of the requested extended feature
3050   block within the device's RIO configuration space or
3051   0 in case the device does not support it.  Possible
3052   values for <parameter>ftr</parameter>:
3053   </para><para>
3054
3055   <constant>RIO_EFB_PAR_EP_ID</constant>		LP/LVDS EP Devices
3056   </para><para>
3057
3058   <constant>RIO_EFB_PAR_EP_REC_ID</constant>	LP/LVDS EP Recovery Devices
3059   </para><para>
3060
3061   <constant>RIO_EFB_PAR_EP_FREE_ID</constant>	LP/LVDS EP Free Devices
3062   </para><para>
3063
3064   <constant>RIO_EFB_SER_EP_ID</constant>		LP/Serial EP Devices
3065   </para><para>
3066
3067   <constant>RIO_EFB_SER_EP_REC_ID</constant>	LP/Serial EP Recovery Devices
3068   </para><para>
3069
3070   <constant>RIO_EFB_SER_EP_FREE_ID</constant>	LP/Serial EP Free Devices
3071</para>
3072</refsect1>
3073</refentry>
3074
3075<refentry id="API-rio-get-asm">
3076<refentryinfo>
3077 <title>LINUX</title>
3078 <productname>Kernel Hackers Manual</productname>
3079 <date>July 2017</date>
3080</refentryinfo>
3081<refmeta>
3082 <refentrytitle><phrase>rio_get_asm</phrase></refentrytitle>
3083 <manvolnum>9</manvolnum>
3084 <refmiscinfo class="version">4.1.27</refmiscinfo>
3085</refmeta>
3086<refnamediv>
3087 <refname>rio_get_asm</refname>
3088 <refpurpose>
3089     Begin or continue searching for a RIO device by vid/did/asm_vid/asm_did
3090 </refpurpose>
3091</refnamediv>
3092<refsynopsisdiv>
3093 <title>Synopsis</title>
3094  <funcsynopsis><funcprototype>
3095   <funcdef>struct rio_dev * <function>rio_get_asm </function></funcdef>
3096   <paramdef>u16 <parameter>vid</parameter></paramdef>
3097   <paramdef>u16 <parameter>did</parameter></paramdef>
3098   <paramdef>u16 <parameter>asm_vid</parameter></paramdef>
3099   <paramdef>u16 <parameter>asm_did</parameter></paramdef>
3100   <paramdef>struct rio_dev * <parameter>from</parameter></paramdef>
3101  </funcprototype></funcsynopsis>
3102</refsynopsisdiv>
3103<refsect1>
3104 <title>Arguments</title>
3105 <variablelist>
3106  <varlistentry>
3107   <term><parameter>vid</parameter></term>
3108   <listitem>
3109    <para>
3110     RIO vid to match or <constant>RIO_ANY_ID</constant> to match all vids
3111    </para>
3112   </listitem>
3113  </varlistentry>
3114  <varlistentry>
3115   <term><parameter>did</parameter></term>
3116   <listitem>
3117    <para>
3118     RIO did to match or <constant>RIO_ANY_ID</constant> to match all dids
3119    </para>
3120   </listitem>
3121  </varlistentry>
3122  <varlistentry>
3123   <term><parameter>asm_vid</parameter></term>
3124   <listitem>
3125    <para>
3126     RIO asm_vid to match or <constant>RIO_ANY_ID</constant> to match all asm_vids
3127    </para>
3128   </listitem>
3129  </varlistentry>
3130  <varlistentry>
3131   <term><parameter>asm_did</parameter></term>
3132   <listitem>
3133    <para>
3134     RIO asm_did to match or <constant>RIO_ANY_ID</constant> to match all asm_dids
3135    </para>
3136   </listitem>
3137  </varlistentry>
3138  <varlistentry>
3139   <term><parameter>from</parameter></term>
3140   <listitem>
3141    <para>
3142     Previous RIO device found in search, or <constant>NULL</constant> for new search
3143    </para>
3144   </listitem>
3145  </varlistentry>
3146 </variablelist>
3147</refsect1>
3148<refsect1>
3149<title>Description</title>
3150<para>
3151   Iterates through the list of known RIO devices. If a RIO device is
3152   found with a matching <parameter>vid</parameter>, <parameter>did</parameter>, <parameter>asm_vid</parameter>, <parameter>asm_did</parameter>, the reference
3153   count to the device is incrememted and a pointer to its device
3154   structure is returned. Otherwise, <constant>NULL</constant> is returned. A new search
3155   is initiated by passing <constant>NULL</constant> to the <parameter>from</parameter> argument. Otherwise, if
3156   <parameter>from</parameter> is not <constant>NULL</constant>, searches continue from next device on the global
3157   list. The reference count for <parameter>from</parameter> is always decremented if it is
3158   not <constant>NULL</constant>.
3159</para>
3160</refsect1>
3161</refentry>
3162
3163<refentry id="API-rio-get-device">
3164<refentryinfo>
3165 <title>LINUX</title>
3166 <productname>Kernel Hackers Manual</productname>
3167 <date>July 2017</date>
3168</refentryinfo>
3169<refmeta>
3170 <refentrytitle><phrase>rio_get_device</phrase></refentrytitle>
3171 <manvolnum>9</manvolnum>
3172 <refmiscinfo class="version">4.1.27</refmiscinfo>
3173</refmeta>
3174<refnamediv>
3175 <refname>rio_get_device</refname>
3176 <refpurpose>
3177     Begin or continue searching for a RIO device by vid/did
3178 </refpurpose>
3179</refnamediv>
3180<refsynopsisdiv>
3181 <title>Synopsis</title>
3182  <funcsynopsis><funcprototype>
3183   <funcdef>struct rio_dev * <function>rio_get_device </function></funcdef>
3184   <paramdef>u16 <parameter>vid</parameter></paramdef>
3185   <paramdef>u16 <parameter>did</parameter></paramdef>
3186   <paramdef>struct rio_dev * <parameter>from</parameter></paramdef>
3187  </funcprototype></funcsynopsis>
3188</refsynopsisdiv>
3189<refsect1>
3190 <title>Arguments</title>
3191 <variablelist>
3192  <varlistentry>
3193   <term><parameter>vid</parameter></term>
3194   <listitem>
3195    <para>
3196     RIO vid to match or <constant>RIO_ANY_ID</constant> to match all vids
3197    </para>
3198   </listitem>
3199  </varlistentry>
3200  <varlistentry>
3201   <term><parameter>did</parameter></term>
3202   <listitem>
3203    <para>
3204     RIO did to match or <constant>RIO_ANY_ID</constant> to match all dids
3205    </para>
3206   </listitem>
3207  </varlistentry>
3208  <varlistentry>
3209   <term><parameter>from</parameter></term>
3210   <listitem>
3211    <para>
3212     Previous RIO device found in search, or <constant>NULL</constant> for new search
3213    </para>
3214   </listitem>
3215  </varlistentry>
3216 </variablelist>
3217</refsect1>
3218<refsect1>
3219<title>Description</title>
3220<para>
3221   Iterates through the list of known RIO devices. If a RIO device is
3222   found with a matching <parameter>vid</parameter> and <parameter>did</parameter>, the reference count to the
3223   device is incrememted and a pointer to its device structure is returned.
3224   Otherwise, <constant>NULL</constant> is returned. A new search is initiated by passing <constant>NULL</constant>
3225   to the <parameter>from</parameter> argument. Otherwise, if <parameter>from</parameter> is not <constant>NULL</constant>, searches
3226   continue from next device on the global list. The reference count for
3227   <parameter>from</parameter> is always decremented if it is not <constant>NULL</constant>.
3228</para>
3229</refsect1>
3230</refentry>
3231
3232<refentry id="API-rio-lock-device">
3233<refentryinfo>
3234 <title>LINUX</title>
3235 <productname>Kernel Hackers Manual</productname>
3236 <date>July 2017</date>
3237</refentryinfo>
3238<refmeta>
3239 <refentrytitle><phrase>rio_lock_device</phrase></refentrytitle>
3240 <manvolnum>9</manvolnum>
3241 <refmiscinfo class="version">4.1.27</refmiscinfo>
3242</refmeta>
3243<refnamediv>
3244 <refname>rio_lock_device</refname>
3245 <refpurpose>
3246     Acquires host device lock for specified device
3247 </refpurpose>
3248</refnamediv>
3249<refsynopsisdiv>
3250 <title>Synopsis</title>
3251  <funcsynopsis><funcprototype>
3252   <funcdef>int <function>rio_lock_device </function></funcdef>
3253   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
3254   <paramdef>u16 <parameter>destid</parameter></paramdef>
3255   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
3256   <paramdef>int <parameter>wait_ms</parameter></paramdef>
3257  </funcprototype></funcsynopsis>
3258</refsynopsisdiv>
3259<refsect1>
3260 <title>Arguments</title>
3261 <variablelist>
3262  <varlistentry>
3263   <term><parameter>port</parameter></term>
3264   <listitem>
3265    <para>
3266     Master port to send transaction
3267    </para>
3268   </listitem>
3269  </varlistentry>
3270  <varlistentry>
3271   <term><parameter>destid</parameter></term>
3272   <listitem>
3273    <para>
3274     Destination ID for device/switch
3275    </para>
3276   </listitem>
3277  </varlistentry>
3278  <varlistentry>
3279   <term><parameter>hopcount</parameter></term>
3280   <listitem>
3281    <para>
3282     Hopcount to reach switch
3283    </para>
3284   </listitem>
3285  </varlistentry>
3286  <varlistentry>
3287   <term><parameter>wait_ms</parameter></term>
3288   <listitem>
3289    <para>
3290     Max wait time in msec (0 = no timeout)
3291    </para>
3292   </listitem>
3293  </varlistentry>
3294 </variablelist>
3295</refsect1>
3296<refsect1>
3297<title>Description</title>
3298<para>
3299   Attepts to acquire host device lock for specified device
3300   Returns 0 if device lock acquired or EINVAL if timeout expires.
3301</para>
3302</refsect1>
3303</refentry>
3304
3305<refentry id="API-rio-unlock-device">
3306<refentryinfo>
3307 <title>LINUX</title>
3308 <productname>Kernel Hackers Manual</productname>
3309 <date>July 2017</date>
3310</refentryinfo>
3311<refmeta>
3312 <refentrytitle><phrase>rio_unlock_device</phrase></refentrytitle>
3313 <manvolnum>9</manvolnum>
3314 <refmiscinfo class="version">4.1.27</refmiscinfo>
3315</refmeta>
3316<refnamediv>
3317 <refname>rio_unlock_device</refname>
3318 <refpurpose>
3319     Releases host device lock for specified device
3320 </refpurpose>
3321</refnamediv>
3322<refsynopsisdiv>
3323 <title>Synopsis</title>
3324  <funcsynopsis><funcprototype>
3325   <funcdef>int <function>rio_unlock_device </function></funcdef>
3326   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
3327   <paramdef>u16 <parameter>destid</parameter></paramdef>
3328   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
3329  </funcprototype></funcsynopsis>
3330</refsynopsisdiv>
3331<refsect1>
3332 <title>Arguments</title>
3333 <variablelist>
3334  <varlistentry>
3335   <term><parameter>port</parameter></term>
3336   <listitem>
3337    <para>
3338     Master port to send transaction
3339    </para>
3340   </listitem>
3341  </varlistentry>
3342  <varlistentry>
3343   <term><parameter>destid</parameter></term>
3344   <listitem>
3345    <para>
3346     Destination ID for device/switch
3347    </para>
3348   </listitem>
3349  </varlistentry>
3350  <varlistentry>
3351   <term><parameter>hopcount</parameter></term>
3352   <listitem>
3353    <para>
3354     Hopcount to reach switch
3355    </para>
3356   </listitem>
3357  </varlistentry>
3358 </variablelist>
3359</refsect1>
3360<refsect1>
3361<title>Description</title>
3362<para>
3363   Returns 0 if device lock released or EINVAL if fails.
3364</para>
3365</refsect1>
3366</refentry>
3367
3368<refentry id="API-rio-route-add-entry">
3369<refentryinfo>
3370 <title>LINUX</title>
3371 <productname>Kernel Hackers Manual</productname>
3372 <date>July 2017</date>
3373</refentryinfo>
3374<refmeta>
3375 <refentrytitle><phrase>rio_route_add_entry</phrase></refentrytitle>
3376 <manvolnum>9</manvolnum>
3377 <refmiscinfo class="version">4.1.27</refmiscinfo>
3378</refmeta>
3379<refnamediv>
3380 <refname>rio_route_add_entry</refname>
3381 <refpurpose>
3382     Add a route entry to a switch routing table
3383 </refpurpose>
3384</refnamediv>
3385<refsynopsisdiv>
3386 <title>Synopsis</title>
3387  <funcsynopsis><funcprototype>
3388   <funcdef>int <function>rio_route_add_entry </function></funcdef>
3389   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
3390   <paramdef>u16 <parameter>table</parameter></paramdef>
3391   <paramdef>u16 <parameter>route_destid</parameter></paramdef>
3392   <paramdef>u8 <parameter>route_port</parameter></paramdef>
3393   <paramdef>int <parameter>lock</parameter></paramdef>
3394  </funcprototype></funcsynopsis>
3395</refsynopsisdiv>
3396<refsect1>
3397 <title>Arguments</title>
3398 <variablelist>
3399  <varlistentry>
3400   <term><parameter>rdev</parameter></term>
3401   <listitem>
3402    <para>
3403     RIO device
3404    </para>
3405   </listitem>
3406  </varlistentry>
3407  <varlistentry>
3408   <term><parameter>table</parameter></term>
3409   <listitem>
3410    <para>
3411     Routing table ID
3412    </para>
3413   </listitem>
3414  </varlistentry>
3415  <varlistentry>
3416   <term><parameter>route_destid</parameter></term>
3417   <listitem>
3418    <para>
3419     Destination ID to be routed
3420    </para>
3421   </listitem>
3422  </varlistentry>
3423  <varlistentry>
3424   <term><parameter>route_port</parameter></term>
3425   <listitem>
3426    <para>
3427     Port number to be routed
3428    </para>
3429   </listitem>
3430  </varlistentry>
3431  <varlistentry>
3432   <term><parameter>lock</parameter></term>
3433   <listitem>
3434    <para>
3435     apply a hardware lock on switch device flag (1=lock, 0=no_lock)
3436    </para>
3437   </listitem>
3438  </varlistentry>
3439 </variablelist>
3440</refsect1>
3441<refsect1>
3442<title>Description</title>
3443<para>
3444   If available calls the switch specific <function>add_entry</function> method to add a route
3445   entry into a switch routing table. Otherwise uses standard RT update method
3446   as defined by RapidIO specification. A specific routing table can be selected
3447   using the <parameter>table</parameter> argument if a switch has per port routing tables or
3448   the standard (or global) table may be used by passing
3449   <constant>RIO_GLOBAL_TABLE</constant> in <parameter>table</parameter>.
3450   </para><para>
3451
3452   Returns <constant>0</constant> on success or <constant>-EINVAL</constant> on failure.
3453</para>
3454</refsect1>
3455</refentry>
3456
3457<refentry id="API-rio-route-get-entry">
3458<refentryinfo>
3459 <title>LINUX</title>
3460 <productname>Kernel Hackers Manual</productname>
3461 <date>July 2017</date>
3462</refentryinfo>
3463<refmeta>
3464 <refentrytitle><phrase>rio_route_get_entry</phrase></refentrytitle>
3465 <manvolnum>9</manvolnum>
3466 <refmiscinfo class="version">4.1.27</refmiscinfo>
3467</refmeta>
3468<refnamediv>
3469 <refname>rio_route_get_entry</refname>
3470 <refpurpose>
3471     Read an entry from a switch routing table
3472 </refpurpose>
3473</refnamediv>
3474<refsynopsisdiv>
3475 <title>Synopsis</title>
3476  <funcsynopsis><funcprototype>
3477   <funcdef>int <function>rio_route_get_entry </function></funcdef>
3478   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
3479   <paramdef>u16 <parameter>table</parameter></paramdef>
3480   <paramdef>u16 <parameter>route_destid</parameter></paramdef>
3481   <paramdef>u8 * <parameter>route_port</parameter></paramdef>
3482   <paramdef>int <parameter>lock</parameter></paramdef>
3483  </funcprototype></funcsynopsis>
3484</refsynopsisdiv>
3485<refsect1>
3486 <title>Arguments</title>
3487 <variablelist>
3488  <varlistentry>
3489   <term><parameter>rdev</parameter></term>
3490   <listitem>
3491    <para>
3492     RIO device
3493    </para>
3494   </listitem>
3495  </varlistentry>
3496  <varlistentry>
3497   <term><parameter>table</parameter></term>
3498   <listitem>
3499    <para>
3500     Routing table ID
3501    </para>
3502   </listitem>
3503  </varlistentry>
3504  <varlistentry>
3505   <term><parameter>route_destid</parameter></term>
3506   <listitem>
3507    <para>
3508     Destination ID to be routed
3509    </para>
3510   </listitem>
3511  </varlistentry>
3512  <varlistentry>
3513   <term><parameter>route_port</parameter></term>
3514   <listitem>
3515    <para>
3516     Pointer to read port number into
3517    </para>
3518   </listitem>
3519  </varlistentry>
3520  <varlistentry>
3521   <term><parameter>lock</parameter></term>
3522   <listitem>
3523    <para>
3524     apply a hardware lock on switch device flag (1=lock, 0=no_lock)
3525    </para>
3526   </listitem>
3527  </varlistentry>
3528 </variablelist>
3529</refsect1>
3530<refsect1>
3531<title>Description</title>
3532<para>
3533   If available calls the switch specific <function>get_entry</function> method to fetch a route
3534   entry from a switch routing table. Otherwise uses standard RT read method
3535   as defined by RapidIO specification. A specific routing table can be selected
3536   using the <parameter>table</parameter> argument if a switch has per port routing tables or
3537   the standard (or global) table may be used by passing
3538   <constant>RIO_GLOBAL_TABLE</constant> in <parameter>table</parameter>.
3539   </para><para>
3540
3541   Returns <constant>0</constant> on success or <constant>-EINVAL</constant> on failure.
3542</para>
3543</refsect1>
3544</refentry>
3545
3546<refentry id="API-rio-route-clr-table">
3547<refentryinfo>
3548 <title>LINUX</title>
3549 <productname>Kernel Hackers Manual</productname>
3550 <date>July 2017</date>
3551</refentryinfo>
3552<refmeta>
3553 <refentrytitle><phrase>rio_route_clr_table</phrase></refentrytitle>
3554 <manvolnum>9</manvolnum>
3555 <refmiscinfo class="version">4.1.27</refmiscinfo>
3556</refmeta>
3557<refnamediv>
3558 <refname>rio_route_clr_table</refname>
3559 <refpurpose>
3560     Clear a switch routing table
3561 </refpurpose>
3562</refnamediv>
3563<refsynopsisdiv>
3564 <title>Synopsis</title>
3565  <funcsynopsis><funcprototype>
3566   <funcdef>int <function>rio_route_clr_table </function></funcdef>
3567   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
3568   <paramdef>u16 <parameter>table</parameter></paramdef>
3569   <paramdef>int <parameter>lock</parameter></paramdef>
3570  </funcprototype></funcsynopsis>
3571</refsynopsisdiv>
3572<refsect1>
3573 <title>Arguments</title>
3574 <variablelist>
3575  <varlistentry>
3576   <term><parameter>rdev</parameter></term>
3577   <listitem>
3578    <para>
3579     RIO device
3580    </para>
3581   </listitem>
3582  </varlistentry>
3583  <varlistentry>
3584   <term><parameter>table</parameter></term>
3585   <listitem>
3586    <para>
3587     Routing table ID
3588    </para>
3589   </listitem>
3590  </varlistentry>
3591  <varlistentry>
3592   <term><parameter>lock</parameter></term>
3593   <listitem>
3594    <para>
3595     apply a hardware lock on switch device flag (1=lock, 0=no_lock)
3596    </para>
3597   </listitem>
3598  </varlistentry>
3599 </variablelist>
3600</refsect1>
3601<refsect1>
3602<title>Description</title>
3603<para>
3604   If available calls the switch specific <function>clr_table</function> method to clear a switch
3605   routing table. Otherwise uses standard RT write method as defined by RapidIO
3606   specification. A specific routing table can be selected using the <parameter>table</parameter>
3607   argument if a switch has per port routing tables or the standard (or global)
3608   table may be used by passing <constant>RIO_GLOBAL_TABLE</constant> in <parameter>table</parameter>.
3609   </para><para>
3610
3611   Returns <constant>0</constant> on success or <constant>-EINVAL</constant> on failure.
3612</para>
3613</refsect1>
3614</refentry>
3615
3616<refentry id="API-rio-request-mport-dma">
3617<refentryinfo>
3618 <title>LINUX</title>
3619 <productname>Kernel Hackers Manual</productname>
3620 <date>July 2017</date>
3621</refentryinfo>
3622<refmeta>
3623 <refentrytitle><phrase>rio_request_mport_dma</phrase></refentrytitle>
3624 <manvolnum>9</manvolnum>
3625 <refmiscinfo class="version">4.1.27</refmiscinfo>
3626</refmeta>
3627<refnamediv>
3628 <refname>rio_request_mport_dma</refname>
3629 <refpurpose>
3630     request RapidIO capable DMA channel associated with specified local RapidIO mport device.
3631 </refpurpose>
3632</refnamediv>
3633<refsynopsisdiv>
3634 <title>Synopsis</title>
3635  <funcsynopsis><funcprototype>
3636   <funcdef>struct dma_chan * <function>rio_request_mport_dma </function></funcdef>
3637   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
3638  </funcprototype></funcsynopsis>
3639</refsynopsisdiv>
3640<refsect1>
3641 <title>Arguments</title>
3642 <variablelist>
3643  <varlistentry>
3644   <term><parameter>mport</parameter></term>
3645   <listitem>
3646    <para>
3647     RIO mport to perform DMA data transfers
3648    </para>
3649   </listitem>
3650  </varlistentry>
3651 </variablelist>
3652</refsect1>
3653<refsect1>
3654<title>Description</title>
3655<para>
3656   Returns pointer to allocated DMA channel or NULL if failed.
3657</para>
3658</refsect1>
3659</refentry>
3660
3661<refentry id="API-rio-request-dma">
3662<refentryinfo>
3663 <title>LINUX</title>
3664 <productname>Kernel Hackers Manual</productname>
3665 <date>July 2017</date>
3666</refentryinfo>
3667<refmeta>
3668 <refentrytitle><phrase>rio_request_dma</phrase></refentrytitle>
3669 <manvolnum>9</manvolnum>
3670 <refmiscinfo class="version">4.1.27</refmiscinfo>
3671</refmeta>
3672<refnamediv>
3673 <refname>rio_request_dma</refname>
3674 <refpurpose>
3675     request RapidIO capable DMA channel that supports specified target RapidIO device.
3676 </refpurpose>
3677</refnamediv>
3678<refsynopsisdiv>
3679 <title>Synopsis</title>
3680  <funcsynopsis><funcprototype>
3681   <funcdef>struct dma_chan * <function>rio_request_dma </function></funcdef>
3682   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
3683  </funcprototype></funcsynopsis>
3684</refsynopsisdiv>
3685<refsect1>
3686 <title>Arguments</title>
3687 <variablelist>
3688  <varlistentry>
3689   <term><parameter>rdev</parameter></term>
3690   <listitem>
3691    <para>
3692     RIO device associated with DMA transfer
3693    </para>
3694   </listitem>
3695  </varlistentry>
3696 </variablelist>
3697</refsect1>
3698<refsect1>
3699<title>Description</title>
3700<para>
3701   Returns pointer to allocated DMA channel or NULL if failed.
3702</para>
3703</refsect1>
3704</refentry>
3705
3706<refentry id="API-rio-release-dma">
3707<refentryinfo>
3708 <title>LINUX</title>
3709 <productname>Kernel Hackers Manual</productname>
3710 <date>July 2017</date>
3711</refentryinfo>
3712<refmeta>
3713 <refentrytitle><phrase>rio_release_dma</phrase></refentrytitle>
3714 <manvolnum>9</manvolnum>
3715 <refmiscinfo class="version">4.1.27</refmiscinfo>
3716</refmeta>
3717<refnamediv>
3718 <refname>rio_release_dma</refname>
3719 <refpurpose>
3720     release specified DMA channel
3721 </refpurpose>
3722</refnamediv>
3723<refsynopsisdiv>
3724 <title>Synopsis</title>
3725  <funcsynopsis><funcprototype>
3726   <funcdef>void <function>rio_release_dma </function></funcdef>
3727   <paramdef>struct dma_chan * <parameter>dchan</parameter></paramdef>
3728  </funcprototype></funcsynopsis>
3729</refsynopsisdiv>
3730<refsect1>
3731 <title>Arguments</title>
3732 <variablelist>
3733  <varlistentry>
3734   <term><parameter>dchan</parameter></term>
3735   <listitem>
3736    <para>
3737     DMA channel to release
3738    </para>
3739   </listitem>
3740  </varlistentry>
3741 </variablelist>
3742</refsect1>
3743</refentry>
3744
3745<refentry id="API-rio-dma-prep-xfer">
3746<refentryinfo>
3747 <title>LINUX</title>
3748 <productname>Kernel Hackers Manual</productname>
3749 <date>July 2017</date>
3750</refentryinfo>
3751<refmeta>
3752 <refentrytitle><phrase>rio_dma_prep_xfer</phrase></refentrytitle>
3753 <manvolnum>9</manvolnum>
3754 <refmiscinfo class="version">4.1.27</refmiscinfo>
3755</refmeta>
3756<refnamediv>
3757 <refname>rio_dma_prep_xfer</refname>
3758 <refpurpose>
3759     RapidIO specific wrapper for device_prep_slave_sg callback defined by DMAENGINE.
3760 </refpurpose>
3761</refnamediv>
3762<refsynopsisdiv>
3763 <title>Synopsis</title>
3764  <funcsynopsis><funcprototype>
3765   <funcdef>struct dma_async_tx_descriptor * <function>rio_dma_prep_xfer </function></funcdef>
3766   <paramdef>struct dma_chan * <parameter>dchan</parameter></paramdef>
3767   <paramdef>u16 <parameter>destid</parameter></paramdef>
3768   <paramdef>struct rio_dma_data * <parameter>data</parameter></paramdef>
3769   <paramdef>enum dma_transfer_direction <parameter>direction</parameter></paramdef>
3770   <paramdef>unsigned long <parameter>flags</parameter></paramdef>
3771  </funcprototype></funcsynopsis>
3772</refsynopsisdiv>
3773<refsect1>
3774 <title>Arguments</title>
3775 <variablelist>
3776  <varlistentry>
3777   <term><parameter>dchan</parameter></term>
3778   <listitem>
3779    <para>
3780     DMA channel to configure
3781    </para>
3782   </listitem>
3783  </varlistentry>
3784  <varlistentry>
3785   <term><parameter>destid</parameter></term>
3786   <listitem>
3787    <para>
3788     target RapidIO device destination ID
3789    </para>
3790   </listitem>
3791  </varlistentry>
3792  <varlistentry>
3793   <term><parameter>data</parameter></term>
3794   <listitem>
3795    <para>
3796     RIO specific data descriptor
3797    </para>
3798   </listitem>
3799  </varlistentry>
3800  <varlistentry>
3801   <term><parameter>direction</parameter></term>
3802   <listitem>
3803    <para>
3804     DMA data transfer direction (TO or FROM the device)
3805    </para>
3806   </listitem>
3807  </varlistentry>
3808  <varlistentry>
3809   <term><parameter>flags</parameter></term>
3810   <listitem>
3811    <para>
3812     dmaengine defined flags
3813    </para>
3814   </listitem>
3815  </varlistentry>
3816 </variablelist>
3817</refsect1>
3818<refsect1>
3819<title>Description</title>
3820<para>
3821   Initializes RapidIO capable DMA channel for the specified data transfer.
3822   Uses DMA channel private extension to pass information related to remote
3823   target RIO device.
3824   Returns pointer to DMA transaction descriptor or NULL if failed.
3825</para>
3826</refsect1>
3827</refentry>
3828
3829<refentry id="API-rio-dma-prep-slave-sg">
3830<refentryinfo>
3831 <title>LINUX</title>
3832 <productname>Kernel Hackers Manual</productname>
3833 <date>July 2017</date>
3834</refentryinfo>
3835<refmeta>
3836 <refentrytitle><phrase>rio_dma_prep_slave_sg</phrase></refentrytitle>
3837 <manvolnum>9</manvolnum>
3838 <refmiscinfo class="version">4.1.27</refmiscinfo>
3839</refmeta>
3840<refnamediv>
3841 <refname>rio_dma_prep_slave_sg</refname>
3842 <refpurpose>
3843     RapidIO specific wrapper for device_prep_slave_sg callback defined by DMAENGINE.
3844 </refpurpose>
3845</refnamediv>
3846<refsynopsisdiv>
3847 <title>Synopsis</title>
3848  <funcsynopsis><funcprototype>
3849   <funcdef>struct dma_async_tx_descriptor * <function>rio_dma_prep_slave_sg </function></funcdef>
3850   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
3851   <paramdef>struct dma_chan * <parameter>dchan</parameter></paramdef>
3852   <paramdef>struct rio_dma_data * <parameter>data</parameter></paramdef>
3853   <paramdef>enum dma_transfer_direction <parameter>direction</parameter></paramdef>
3854   <paramdef>unsigned long <parameter>flags</parameter></paramdef>
3855  </funcprototype></funcsynopsis>
3856</refsynopsisdiv>
3857<refsect1>
3858 <title>Arguments</title>
3859 <variablelist>
3860  <varlistentry>
3861   <term><parameter>rdev</parameter></term>
3862   <listitem>
3863    <para>
3864     RIO device control structure
3865    </para>
3866   </listitem>
3867  </varlistentry>
3868  <varlistentry>
3869   <term><parameter>dchan</parameter></term>
3870   <listitem>
3871    <para>
3872     DMA channel to configure
3873    </para>
3874   </listitem>
3875  </varlistentry>
3876  <varlistentry>
3877   <term><parameter>data</parameter></term>
3878   <listitem>
3879    <para>
3880     RIO specific data descriptor
3881    </para>
3882   </listitem>
3883  </varlistentry>
3884  <varlistentry>
3885   <term><parameter>direction</parameter></term>
3886   <listitem>
3887    <para>
3888     DMA data transfer direction (TO or FROM the device)
3889    </para>
3890   </listitem>
3891  </varlistentry>
3892  <varlistentry>
3893   <term><parameter>flags</parameter></term>
3894   <listitem>
3895    <para>
3896     dmaengine defined flags
3897    </para>
3898   </listitem>
3899  </varlistentry>
3900 </variablelist>
3901</refsect1>
3902<refsect1>
3903<title>Description</title>
3904<para>
3905   Initializes RapidIO capable DMA channel for the specified data transfer.
3906   Uses DMA channel private extension to pass information related to remote
3907   target RIO device.
3908   Returns pointer to DMA transaction descriptor or NULL if failed.
3909</para>
3910</refsect1>
3911</refentry>
3912
3913<refentry id="API-rio-register-scan">
3914<refentryinfo>
3915 <title>LINUX</title>
3916 <productname>Kernel Hackers Manual</productname>
3917 <date>July 2017</date>
3918</refentryinfo>
3919<refmeta>
3920 <refentrytitle><phrase>rio_register_scan</phrase></refentrytitle>
3921 <manvolnum>9</manvolnum>
3922 <refmiscinfo class="version">4.1.27</refmiscinfo>
3923</refmeta>
3924<refnamediv>
3925 <refname>rio_register_scan</refname>
3926 <refpurpose>
3927     enumeration/discovery method registration interface
3928 </refpurpose>
3929</refnamediv>
3930<refsynopsisdiv>
3931 <title>Synopsis</title>
3932  <funcsynopsis><funcprototype>
3933   <funcdef>int <function>rio_register_scan </function></funcdef>
3934   <paramdef>int <parameter>mport_id</parameter></paramdef>
3935   <paramdef>struct rio_scan * <parameter>scan_ops</parameter></paramdef>
3936  </funcprototype></funcsynopsis>
3937</refsynopsisdiv>
3938<refsect1>
3939 <title>Arguments</title>
3940 <variablelist>
3941  <varlistentry>
3942   <term><parameter>mport_id</parameter></term>
3943   <listitem>
3944    <para>
3945     mport device ID for which fabric scan routine has to be set
3946     (RIO_MPORT_ANY = set for all available mports)
3947    </para>
3948   </listitem>
3949  </varlistentry>
3950  <varlistentry>
3951   <term><parameter>scan_ops</parameter></term>
3952   <listitem>
3953    <para>
3954     enumeration/discovery operations structure
3955    </para>
3956   </listitem>
3957  </varlistentry>
3958 </variablelist>
3959</refsect1>
3960<refsect1>
3961<title>Description</title>
3962<para>
3963   Registers enumeration/discovery operations with RapidIO subsystem and
3964   attaches it to the specified mport device (or all available mports
3965   if RIO_MPORT_ANY is specified).
3966   </para><para>
3967
3968   Returns error if the mport already has an enumerator attached to it.
3969   In case of RIO_MPORT_ANY skips mports with valid scan routines (no error).
3970</para>
3971</refsect1>
3972</refentry>
3973
3974<refentry id="API-rio-unregister-scan">
3975<refentryinfo>
3976 <title>LINUX</title>
3977 <productname>Kernel Hackers Manual</productname>
3978 <date>July 2017</date>
3979</refentryinfo>
3980<refmeta>
3981 <refentrytitle><phrase>rio_unregister_scan</phrase></refentrytitle>
3982 <manvolnum>9</manvolnum>
3983 <refmiscinfo class="version">4.1.27</refmiscinfo>
3984</refmeta>
3985<refnamediv>
3986 <refname>rio_unregister_scan</refname>
3987 <refpurpose>
3988     removes enumeration/discovery method from mport
3989 </refpurpose>
3990</refnamediv>
3991<refsynopsisdiv>
3992 <title>Synopsis</title>
3993  <funcsynopsis><funcprototype>
3994   <funcdef>int <function>rio_unregister_scan </function></funcdef>
3995   <paramdef>int <parameter>mport_id</parameter></paramdef>
3996   <paramdef>struct rio_scan * <parameter>scan_ops</parameter></paramdef>
3997  </funcprototype></funcsynopsis>
3998</refsynopsisdiv>
3999<refsect1>
4000 <title>Arguments</title>
4001 <variablelist>
4002  <varlistentry>
4003   <term><parameter>mport_id</parameter></term>
4004   <listitem>
4005    <para>
4006     mport device ID for which fabric scan routine has to be
4007     unregistered (RIO_MPORT_ANY = apply to all mports that use
4008     the specified scan_ops)
4009    </para>
4010   </listitem>
4011  </varlistentry>
4012  <varlistentry>
4013   <term><parameter>scan_ops</parameter></term>
4014   <listitem>
4015    <para>
4016     enumeration/discovery operations structure
4017    </para>
4018   </listitem>
4019  </varlistentry>
4020 </variablelist>
4021</refsect1>
4022<refsect1>
4023<title>Description</title>
4024<para>
4025   Removes enumeration or discovery method assigned to the specified mport
4026   device. If RIO_MPORT_ANY is specified, removes the specified operations from
4027   all mports that have them attached.
4028</para>
4029</refsect1>
4030</refentry>
4031
4032	</sect1>
4033  </chapter>
4034
4035  <chapter id="internals">
4036     <title>Internals</title>
4037
4038     <para>
4039     This chapter contains the autogenerated documentation of the RapidIO
4040     subsystem.
4041     </para>
4042
4043     <sect1 id="Structures"><title>Structures</title>
4044<!-- include/linux/rio.h -->
4045<refentry id="API-struct-rio-switch">
4046<refentryinfo>
4047 <title>LINUX</title>
4048 <productname>Kernel Hackers Manual</productname>
4049 <date>July 2017</date>
4050</refentryinfo>
4051<refmeta>
4052 <refentrytitle><phrase>struct rio_switch</phrase></refentrytitle>
4053 <manvolnum>9</manvolnum>
4054 <refmiscinfo class="version">4.1.27</refmiscinfo>
4055</refmeta>
4056<refnamediv>
4057 <refname>struct rio_switch</refname>
4058 <refpurpose>
4059  RIO switch info
4060 </refpurpose>
4061</refnamediv>
4062<refsynopsisdiv>
4063 <title>Synopsis</title>
4064  <programlisting>
4065struct rio_switch {
4066  struct list_head node;
4067  u8 * route_table;
4068  u32 port_ok;
4069  struct rio_switch_ops * ops;
4070  spinlock_t lock;
4071  struct rio_dev * nextdev[0];
4072};  </programlisting>
4073</refsynopsisdiv>
4074 <refsect1>
4075  <title>Members</title>
4076  <variablelist>
4077    <varlistentry>      <term>node</term>
4078      <listitem><para>
4079Node in global list of switches
4080      </para></listitem>
4081    </varlistentry>
4082    <varlistentry>      <term>route_table</term>
4083      <listitem><para>
4084Copy of switch routing table
4085      </para></listitem>
4086    </varlistentry>
4087    <varlistentry>      <term>port_ok</term>
4088      <listitem><para>
4089Status of each port (one bit per port) - OK=1 or UNINIT=0
4090      </para></listitem>
4091    </varlistentry>
4092    <varlistentry>      <term>ops</term>
4093      <listitem><para>
4094pointer to switch-specific operations
4095      </para></listitem>
4096    </varlistentry>
4097    <varlistentry>      <term>lock</term>
4098      <listitem><para>
4099lock to serialize operations updates
4100      </para></listitem>
4101    </varlistentry>
4102    <varlistentry>      <term>nextdev[0]</term>
4103      <listitem><para>
4104Array of per-port pointers to the next attached device
4105      </para></listitem>
4106    </varlistentry>
4107  </variablelist>
4108 </refsect1>
4109</refentry>
4110
4111<refentry id="API-struct-rio-switch-ops">
4112<refentryinfo>
4113 <title>LINUX</title>
4114 <productname>Kernel Hackers Manual</productname>
4115 <date>July 2017</date>
4116</refentryinfo>
4117<refmeta>
4118 <refentrytitle><phrase>struct rio_switch_ops</phrase></refentrytitle>
4119 <manvolnum>9</manvolnum>
4120 <refmiscinfo class="version">4.1.27</refmiscinfo>
4121</refmeta>
4122<refnamediv>
4123 <refname>struct rio_switch_ops</refname>
4124 <refpurpose>
4125     Per-switch operations
4126 </refpurpose>
4127</refnamediv>
4128<refsynopsisdiv>
4129 <title>Synopsis</title>
4130  <programlisting>
4131struct rio_switch_ops {
4132  struct module * owner;
4133  int (* add_entry) (struct rio_mport *mport, u16 destid, u8 hopcount,u16 table, u16 route_destid, u8 route_port);
4134  int (* get_entry) (struct rio_mport *mport, u16 destid, u8 hopcount,u16 table, u16 route_destid, u8 *route_port);
4135  int (* clr_table) (struct rio_mport *mport, u16 destid, u8 hopcount,u16 table);
4136  int (* set_domain) (struct rio_mport *mport, u16 destid, u8 hopcount,u8 sw_domain);
4137  int (* get_domain) (struct rio_mport *mport, u16 destid, u8 hopcount,u8 *sw_domain);
4138  int (* em_init) (struct rio_dev *dev);
4139  int (* em_handle) (struct rio_dev *dev, u8 swport);
4140};  </programlisting>
4141</refsynopsisdiv>
4142 <refsect1>
4143  <title>Members</title>
4144  <variablelist>
4145    <varlistentry>      <term>owner</term>
4146      <listitem><para>
4147   The module owner of this structure
4148      </para></listitem>
4149    </varlistentry>
4150    <varlistentry>      <term>add_entry</term>
4151      <listitem><para>
4152   Callback for switch-specific route add function
4153      </para></listitem>
4154    </varlistentry>
4155    <varlistentry>      <term>get_entry</term>
4156      <listitem><para>
4157   Callback for switch-specific route get function
4158      </para></listitem>
4159    </varlistentry>
4160    <varlistentry>      <term>clr_table</term>
4161      <listitem><para>
4162   Callback for switch-specific clear route table function
4163      </para></listitem>
4164    </varlistentry>
4165    <varlistentry>      <term>set_domain</term>
4166      <listitem><para>
4167   Callback for switch-specific domain setting function
4168      </para></listitem>
4169    </varlistentry>
4170    <varlistentry>      <term>get_domain</term>
4171      <listitem><para>
4172   Callback for switch-specific domain get function
4173      </para></listitem>
4174    </varlistentry>
4175    <varlistentry>      <term>em_init</term>
4176      <listitem><para>
4177   Callback for switch-specific error management init function
4178      </para></listitem>
4179    </varlistentry>
4180    <varlistentry>      <term>em_handle</term>
4181      <listitem><para>
4182   Callback for switch-specific error management handler function
4183      </para></listitem>
4184    </varlistentry>
4185  </variablelist>
4186 </refsect1>
4187<refsect1>
4188<title>Description</title>
4189<para>
4190   Defines the operations that are necessary to initialize/control
4191   a particular RIO switch device.
4192</para>
4193</refsect1>
4194</refentry>
4195
4196<refentry id="API-struct-rio-dev">
4197<refentryinfo>
4198 <title>LINUX</title>
4199 <productname>Kernel Hackers Manual</productname>
4200 <date>July 2017</date>
4201</refentryinfo>
4202<refmeta>
4203 <refentrytitle><phrase>struct rio_dev</phrase></refentrytitle>
4204 <manvolnum>9</manvolnum>
4205 <refmiscinfo class="version">4.1.27</refmiscinfo>
4206</refmeta>
4207<refnamediv>
4208 <refname>struct rio_dev</refname>
4209 <refpurpose>
4210     RIO device info
4211 </refpurpose>
4212</refnamediv>
4213<refsynopsisdiv>
4214 <title>Synopsis</title>
4215  <programlisting>
4216struct rio_dev {
4217  struct list_head global_list;
4218  struct list_head net_list;
4219  struct rio_net * net;
4220  bool do_enum;
4221  u16 did;
4222  u16 vid;
4223  u32 device_rev;
4224  u16 asm_did;
4225  u16 asm_vid;
4226  u16 asm_rev;
4227  u16 efptr;
4228  u32 pef;
4229  u32 swpinfo;
4230  u32 src_ops;
4231  u32 dst_ops;
4232  u32 comp_tag;
4233  u32 phys_efptr;
4234  u32 em_efptr;
4235  u64 dma_mask;
4236  struct rio_driver * driver;
4237  struct device dev;
4238  struct resource riores[RIO_MAX_DEV_RESOURCES];
4239  int (* pwcback) (struct rio_dev *rdev, union rio_pw_msg *msg, int step);
4240  u16 destid;
4241  u8 hopcount;
4242  struct rio_dev * prev;
4243  struct rio_switch rswitch[0];
4244};  </programlisting>
4245</refsynopsisdiv>
4246 <refsect1>
4247  <title>Members</title>
4248  <variablelist>
4249    <varlistentry>      <term>global_list</term>
4250      <listitem><para>
4251   Node in list of all RIO devices
4252      </para></listitem>
4253    </varlistentry>
4254    <varlistentry>      <term>net_list</term>
4255      <listitem><para>
4256   Node in list of RIO devices in a network
4257      </para></listitem>
4258    </varlistentry>
4259    <varlistentry>      <term>net</term>
4260      <listitem><para>
4261   Network this device is a part of
4262      </para></listitem>
4263    </varlistentry>
4264    <varlistentry>      <term>do_enum</term>
4265      <listitem><para>
4266   Enumeration flag
4267      </para></listitem>
4268    </varlistentry>
4269    <varlistentry>      <term>did</term>
4270      <listitem><para>
4271   Device ID
4272      </para></listitem>
4273    </varlistentry>
4274    <varlistentry>      <term>vid</term>
4275      <listitem><para>
4276   Vendor ID
4277      </para></listitem>
4278    </varlistentry>
4279    <varlistentry>      <term>device_rev</term>
4280      <listitem><para>
4281   Device revision
4282      </para></listitem>
4283    </varlistentry>
4284    <varlistentry>      <term>asm_did</term>
4285      <listitem><para>
4286   Assembly device ID
4287      </para></listitem>
4288    </varlistentry>
4289    <varlistentry>      <term>asm_vid</term>
4290      <listitem><para>
4291   Assembly vendor ID
4292      </para></listitem>
4293    </varlistentry>
4294    <varlistentry>      <term>asm_rev</term>
4295      <listitem><para>
4296   Assembly revision
4297      </para></listitem>
4298    </varlistentry>
4299    <varlistentry>      <term>efptr</term>
4300      <listitem><para>
4301   Extended feature pointer
4302      </para></listitem>
4303    </varlistentry>
4304    <varlistentry>      <term>pef</term>
4305      <listitem><para>
4306   Processing element features
4307      </para></listitem>
4308    </varlistentry>
4309    <varlistentry>      <term>swpinfo</term>
4310      <listitem><para>
4311   Switch port info
4312      </para></listitem>
4313    </varlistentry>
4314    <varlistentry>      <term>src_ops</term>
4315      <listitem><para>
4316   Source operation capabilities
4317      </para></listitem>
4318    </varlistentry>
4319    <varlistentry>      <term>dst_ops</term>
4320      <listitem><para>
4321   Destination operation capabilities
4322      </para></listitem>
4323    </varlistentry>
4324    <varlistentry>      <term>comp_tag</term>
4325      <listitem><para>
4326   RIO component tag
4327      </para></listitem>
4328    </varlistentry>
4329    <varlistentry>      <term>phys_efptr</term>
4330      <listitem><para>
4331   RIO device extended features pointer
4332      </para></listitem>
4333    </varlistentry>
4334    <varlistentry>      <term>em_efptr</term>
4335      <listitem><para>
4336   RIO Error Management features pointer
4337      </para></listitem>
4338    </varlistentry>
4339    <varlistentry>      <term>dma_mask</term>
4340      <listitem><para>
4341   Mask of bits of RIO address this device implements
4342      </para></listitem>
4343    </varlistentry>
4344    <varlistentry>      <term>driver</term>
4345      <listitem><para>
4346   Driver claiming this device
4347      </para></listitem>
4348    </varlistentry>
4349    <varlistentry>      <term>dev</term>
4350      <listitem><para>
4351   Device model device
4352      </para></listitem>
4353    </varlistentry>
4354    <varlistentry>      <term>riores[RIO_MAX_DEV_RESOURCES]</term>
4355      <listitem><para>
4356   RIO resources this device owns
4357      </para></listitem>
4358    </varlistentry>
4359    <varlistentry>      <term>pwcback</term>
4360      <listitem><para>
4361   port-write callback function for this device
4362      </para></listitem>
4363    </varlistentry>
4364    <varlistentry>      <term>destid</term>
4365      <listitem><para>
4366   Network destination ID (or associated destid for switch)
4367      </para></listitem>
4368    </varlistentry>
4369    <varlistentry>      <term>hopcount</term>
4370      <listitem><para>
4371   Hopcount to this device
4372      </para></listitem>
4373    </varlistentry>
4374    <varlistentry>      <term>prev</term>
4375      <listitem><para>
4376   Previous RIO device connected to the current one
4377      </para></listitem>
4378    </varlistentry>
4379    <varlistentry>      <term>rswitch[0]</term>
4380      <listitem><para>
4381   struct rio_switch (if valid for this device)
4382      </para></listitem>
4383    </varlistentry>
4384  </variablelist>
4385 </refsect1>
4386</refentry>
4387
4388<refentry id="API-struct-rio-msg">
4389<refentryinfo>
4390 <title>LINUX</title>
4391 <productname>Kernel Hackers Manual</productname>
4392 <date>July 2017</date>
4393</refentryinfo>
4394<refmeta>
4395 <refentrytitle><phrase>struct rio_msg</phrase></refentrytitle>
4396 <manvolnum>9</manvolnum>
4397 <refmiscinfo class="version">4.1.27</refmiscinfo>
4398</refmeta>
4399<refnamediv>
4400 <refname>struct rio_msg</refname>
4401 <refpurpose>
4402     RIO message event
4403 </refpurpose>
4404</refnamediv>
4405<refsynopsisdiv>
4406 <title>Synopsis</title>
4407  <programlisting>
4408struct rio_msg {
4409  struct resource * res;
4410  void (* mcback) (struct rio_mport * mport, void *dev_id, int mbox, int slot);
4411};  </programlisting>
4412</refsynopsisdiv>
4413 <refsect1>
4414  <title>Members</title>
4415  <variablelist>
4416    <varlistentry>      <term>res</term>
4417      <listitem><para>
4418   Mailbox resource
4419      </para></listitem>
4420    </varlistentry>
4421    <varlistentry>      <term>mcback</term>
4422      <listitem><para>
4423   Message event callback
4424      </para></listitem>
4425    </varlistentry>
4426  </variablelist>
4427 </refsect1>
4428</refentry>
4429
4430<refentry id="API-struct-rio-dbell">
4431<refentryinfo>
4432 <title>LINUX</title>
4433 <productname>Kernel Hackers Manual</productname>
4434 <date>July 2017</date>
4435</refentryinfo>
4436<refmeta>
4437 <refentrytitle><phrase>struct rio_dbell</phrase></refentrytitle>
4438 <manvolnum>9</manvolnum>
4439 <refmiscinfo class="version">4.1.27</refmiscinfo>
4440</refmeta>
4441<refnamediv>
4442 <refname>struct rio_dbell</refname>
4443 <refpurpose>
4444     RIO doorbell event
4445 </refpurpose>
4446</refnamediv>
4447<refsynopsisdiv>
4448 <title>Synopsis</title>
4449  <programlisting>
4450struct rio_dbell {
4451  struct list_head node;
4452  struct resource * res;
4453  void (* dinb) (struct rio_mport *mport, void *dev_id, u16 src, u16 dst, u16 info);
4454  void * dev_id;
4455};  </programlisting>
4456</refsynopsisdiv>
4457 <refsect1>
4458  <title>Members</title>
4459  <variablelist>
4460    <varlistentry>      <term>node</term>
4461      <listitem><para>
4462   Node in list of doorbell events
4463      </para></listitem>
4464    </varlistentry>
4465    <varlistentry>      <term>res</term>
4466      <listitem><para>
4467   Doorbell resource
4468      </para></listitem>
4469    </varlistentry>
4470    <varlistentry>      <term>dinb</term>
4471      <listitem><para>
4472   Doorbell event callback
4473      </para></listitem>
4474    </varlistentry>
4475    <varlistentry>      <term>dev_id</term>
4476      <listitem><para>
4477   Device specific pointer to pass on event
4478      </para></listitem>
4479    </varlistentry>
4480  </variablelist>
4481 </refsect1>
4482</refentry>
4483
4484<refentry id="API-struct-rio-mport">
4485<refentryinfo>
4486 <title>LINUX</title>
4487 <productname>Kernel Hackers Manual</productname>
4488 <date>July 2017</date>
4489</refentryinfo>
4490<refmeta>
4491 <refentrytitle><phrase>struct rio_mport</phrase></refentrytitle>
4492 <manvolnum>9</manvolnum>
4493 <refmiscinfo class="version">4.1.27</refmiscinfo>
4494</refmeta>
4495<refnamediv>
4496 <refname>struct rio_mport</refname>
4497 <refpurpose>
4498     RIO master port info
4499 </refpurpose>
4500</refnamediv>
4501<refsynopsisdiv>
4502 <title>Synopsis</title>
4503  <programlisting>
4504struct rio_mport {
4505  struct list_head dbells;
4506  struct list_head node;
4507  struct list_head nnode;
4508  struct resource iores;
4509  struct resource riores[RIO_MAX_MPORT_RESOURCES];
4510  struct rio_msg inb_msg[RIO_MAX_MBOX];
4511  struct rio_msg outb_msg[RIO_MAX_MBOX];
4512  int host_deviceid;
4513  struct rio_ops * ops;
4514  unsigned char id;
4515  unsigned char index;
4516  unsigned int sys_size;
4517  enum rio_phy_type phy_type;
4518  u32 phys_efptr;
4519  unsigned char name[RIO_MAX_MPORT_NAME];
4520  struct device dev;
4521  void * priv;
4522#ifdef CONFIG_RAPIDIO_DMA_ENGINE
4523  struct dma_device dma;
4524#endif
4525  struct rio_scan * nscan;
4526};  </programlisting>
4527</refsynopsisdiv>
4528 <refsect1>
4529  <title>Members</title>
4530  <variablelist>
4531    <varlistentry>      <term>dbells</term>
4532      <listitem><para>
4533   List of doorbell events
4534      </para></listitem>
4535    </varlistentry>
4536    <varlistentry>      <term>node</term>
4537      <listitem><para>
4538   Node in global list of master ports
4539      </para></listitem>
4540    </varlistentry>
4541    <varlistentry>      <term>nnode</term>
4542      <listitem><para>
4543   Node in network list of master ports
4544      </para></listitem>
4545    </varlistentry>
4546    <varlistentry>      <term>iores</term>
4547      <listitem><para>
4548   I/O mem resource that this master port interface owns
4549      </para></listitem>
4550    </varlistentry>
4551    <varlistentry>      <term>riores[RIO_MAX_MPORT_RESOURCES]</term>
4552      <listitem><para>
4553   RIO resources that this master port interfaces owns
4554      </para></listitem>
4555    </varlistentry>
4556    <varlistentry>      <term>inb_msg[RIO_MAX_MBOX]</term>
4557      <listitem><para>
4558   RIO inbound message event descriptors
4559      </para></listitem>
4560    </varlistentry>
4561    <varlistentry>      <term>outb_msg[RIO_MAX_MBOX]</term>
4562      <listitem><para>
4563   RIO outbound message event descriptors
4564      </para></listitem>
4565    </varlistentry>
4566    <varlistentry>      <term>host_deviceid</term>
4567      <listitem><para>
4568   Host device ID associated with this master port
4569      </para></listitem>
4570    </varlistentry>
4571    <varlistentry>      <term>ops</term>
4572      <listitem><para>
4573   configuration space functions
4574      </para></listitem>
4575    </varlistentry>
4576    <varlistentry>      <term>id</term>
4577      <listitem><para>
4578   Port ID, unique among all ports
4579      </para></listitem>
4580    </varlistentry>
4581    <varlistentry>      <term>index</term>
4582      <listitem><para>
4583   Port index, unique among all port interfaces of the same type
4584      </para></listitem>
4585    </varlistentry>
4586    <varlistentry>      <term>sys_size</term>
4587      <listitem><para>
4588   RapidIO common transport system size
4589      </para></listitem>
4590    </varlistentry>
4591    <varlistentry>      <term>phy_type</term>
4592      <listitem><para>
4593   RapidIO phy type
4594      </para></listitem>
4595    </varlistentry>
4596    <varlistentry>      <term>phys_efptr</term>
4597      <listitem><para>
4598   RIO port extended features pointer
4599      </para></listitem>
4600    </varlistentry>
4601    <varlistentry>      <term>name[RIO_MAX_MPORT_NAME]</term>
4602      <listitem><para>
4603   Port name string
4604      </para></listitem>
4605    </varlistentry>
4606    <varlistentry>      <term>dev</term>
4607      <listitem><para>
4608   device structure associated with an mport
4609      </para></listitem>
4610    </varlistentry>
4611    <varlistentry>      <term>priv</term>
4612      <listitem><para>
4613   Master port private data
4614      </para></listitem>
4615    </varlistentry>
4616    <varlistentry>      <term>dma</term>
4617      <listitem><para>
4618   DMA device associated with mport
4619      </para></listitem>
4620    </varlistentry>
4621    <varlistentry>      <term>nscan</term>
4622      <listitem><para>
4623   RapidIO network enumeration/discovery operations
4624      </para></listitem>
4625    </varlistentry>
4626  </variablelist>
4627 </refsect1>
4628</refentry>
4629
4630<refentry id="API-struct-rio-net">
4631<refentryinfo>
4632 <title>LINUX</title>
4633 <productname>Kernel Hackers Manual</productname>
4634 <date>July 2017</date>
4635</refentryinfo>
4636<refmeta>
4637 <refentrytitle><phrase>struct rio_net</phrase></refentrytitle>
4638 <manvolnum>9</manvolnum>
4639 <refmiscinfo class="version">4.1.27</refmiscinfo>
4640</refmeta>
4641<refnamediv>
4642 <refname>struct rio_net</refname>
4643 <refpurpose>
4644     RIO network info
4645 </refpurpose>
4646</refnamediv>
4647<refsynopsisdiv>
4648 <title>Synopsis</title>
4649  <programlisting>
4650struct rio_net {
4651  struct list_head node;
4652  struct list_head devices;
4653  struct list_head switches;
4654  struct list_head mports;
4655  struct rio_mport * hport;
4656  unsigned char id;
4657  struct rio_id_table destid_table;
4658};  </programlisting>
4659</refsynopsisdiv>
4660 <refsect1>
4661  <title>Members</title>
4662  <variablelist>
4663    <varlistentry>      <term>node</term>
4664      <listitem><para>
4665   Node in global list of RIO networks
4666      </para></listitem>
4667    </varlistentry>
4668    <varlistentry>      <term>devices</term>
4669      <listitem><para>
4670   List of devices in this network
4671      </para></listitem>
4672    </varlistentry>
4673    <varlistentry>      <term>switches</term>
4674      <listitem><para>
4675   List of switches in this netowrk
4676      </para></listitem>
4677    </varlistentry>
4678    <varlistentry>      <term>mports</term>
4679      <listitem><para>
4680   List of master ports accessing this network
4681      </para></listitem>
4682    </varlistentry>
4683    <varlistentry>      <term>hport</term>
4684      <listitem><para>
4685   Default port for accessing this network
4686      </para></listitem>
4687    </varlistentry>
4688    <varlistentry>      <term>id</term>
4689      <listitem><para>
4690   RIO network ID
4691      </para></listitem>
4692    </varlistentry>
4693    <varlistentry>      <term>destid_table</term>
4694      <listitem><para>
4695   destID allocation table
4696      </para></listitem>
4697    </varlistentry>
4698  </variablelist>
4699 </refsect1>
4700</refentry>
4701
4702<refentry id="API-struct-rio-ops">
4703<refentryinfo>
4704 <title>LINUX</title>
4705 <productname>Kernel Hackers Manual</productname>
4706 <date>July 2017</date>
4707</refentryinfo>
4708<refmeta>
4709 <refentrytitle><phrase>struct rio_ops</phrase></refentrytitle>
4710 <manvolnum>9</manvolnum>
4711 <refmiscinfo class="version">4.1.27</refmiscinfo>
4712</refmeta>
4713<refnamediv>
4714 <refname>struct rio_ops</refname>
4715 <refpurpose>
4716     Low-level RIO configuration space operations
4717 </refpurpose>
4718</refnamediv>
4719<refsynopsisdiv>
4720 <title>Synopsis</title>
4721  <programlisting>
4722struct rio_ops {
4723  int (* lcread) (struct rio_mport *mport, int index, u32 offset, int len,u32 *data);
4724  int (* lcwrite) (struct rio_mport *mport, int index, u32 offset, int len,u32 data);
4725  int (* cread) (struct rio_mport *mport, int index, u16 destid,u8 hopcount, u32 offset, int len, u32 *data);
4726  int (* cwrite) (struct rio_mport *mport, int index, u16 destid,u8 hopcount, u32 offset, int len, u32 data);
4727  int (* dsend) (struct rio_mport *mport, int index, u16 destid, u16 data);
4728  int (* pwenable) (struct rio_mport *mport, int enable);
4729  int (* open_outb_mbox) (struct rio_mport *mport, void *dev_id,int mbox, int entries);
4730  void (* close_outb_mbox) (struct rio_mport *mport, int mbox);
4731  int (* open_inb_mbox) (struct rio_mport *mport, void *dev_id,int mbox, int entries);
4732  void (* close_inb_mbox) (struct rio_mport *mport, int mbox);
4733  int (* add_outb_message) (struct rio_mport *mport, struct rio_dev *rdev,int mbox, void *buffer, size_t len);
4734  int (* add_inb_buffer) (struct rio_mport *mport, int mbox, void *buf);
4735  void *(* get_inb_message) (struct rio_mport *mport, int mbox);
4736  int (* map_inb) (struct rio_mport *mport, dma_addr_t lstart,u64 rstart, u32 size, u32 flags);
4737  void (* unmap_inb) (struct rio_mport *mport, dma_addr_t lstart);
4738};  </programlisting>
4739</refsynopsisdiv>
4740 <refsect1>
4741  <title>Members</title>
4742  <variablelist>
4743    <varlistentry>      <term>lcread</term>
4744      <listitem><para>
4745   Callback to perform local (master port) read of config space.
4746      </para></listitem>
4747    </varlistentry>
4748    <varlistentry>      <term>lcwrite</term>
4749      <listitem><para>
4750   Callback to perform local (master port) write of config space.
4751      </para></listitem>
4752    </varlistentry>
4753    <varlistentry>      <term>cread</term>
4754      <listitem><para>
4755   Callback to perform network read of config space.
4756      </para></listitem>
4757    </varlistentry>
4758    <varlistentry>      <term>cwrite</term>
4759      <listitem><para>
4760   Callback to perform network write of config space.
4761      </para></listitem>
4762    </varlistentry>
4763    <varlistentry>      <term>dsend</term>
4764      <listitem><para>
4765   Callback to send a doorbell message.
4766      </para></listitem>
4767    </varlistentry>
4768    <varlistentry>      <term>pwenable</term>
4769      <listitem><para>
4770   Callback to enable/disable port-write message handling.
4771      </para></listitem>
4772    </varlistentry>
4773    <varlistentry>      <term>open_outb_mbox</term>
4774      <listitem><para>
4775   Callback to initialize outbound mailbox.
4776      </para></listitem>
4777    </varlistentry>
4778    <varlistentry>      <term>close_outb_mbox</term>
4779      <listitem><para>
4780   Callback to shut down outbound mailbox.
4781      </para></listitem>
4782    </varlistentry>
4783    <varlistentry>      <term>open_inb_mbox</term>
4784      <listitem><para>
4785   Callback to initialize inbound mailbox.
4786      </para></listitem>
4787    </varlistentry>
4788    <varlistentry>      <term>close_inb_mbox</term>
4789      <listitem><para>
4790   Callback to	shut down inbound mailbox.
4791      </para></listitem>
4792    </varlistentry>
4793    <varlistentry>      <term>add_outb_message</term>
4794      <listitem><para>
4795   Callback to add a message to an outbound mailbox queue.
4796      </para></listitem>
4797    </varlistentry>
4798    <varlistentry>      <term>add_inb_buffer</term>
4799      <listitem><para>
4800   Callback to	add a buffer to an inbound mailbox queue.
4801      </para></listitem>
4802    </varlistentry>
4803    <varlistentry>      <term>get_inb_message</term>
4804      <listitem><para>
4805   Callback to get a message from an inbound mailbox queue.
4806      </para></listitem>
4807    </varlistentry>
4808    <varlistentry>      <term>map_inb</term>
4809      <listitem><para>
4810   Callback to map RapidIO address region into local memory space.
4811      </para></listitem>
4812    </varlistentry>
4813    <varlistentry>      <term>unmap_inb</term>
4814      <listitem><para>
4815   Callback to unmap RapidIO address region mapped with <function>map_inb</function>.
4816      </para></listitem>
4817    </varlistentry>
4818  </variablelist>
4819 </refsect1>
4820</refentry>
4821
4822<refentry id="API-struct-rio-driver">
4823<refentryinfo>
4824 <title>LINUX</title>
4825 <productname>Kernel Hackers Manual</productname>
4826 <date>July 2017</date>
4827</refentryinfo>
4828<refmeta>
4829 <refentrytitle><phrase>struct rio_driver</phrase></refentrytitle>
4830 <manvolnum>9</manvolnum>
4831 <refmiscinfo class="version">4.1.27</refmiscinfo>
4832</refmeta>
4833<refnamediv>
4834 <refname>struct rio_driver</refname>
4835 <refpurpose>
4836     RIO driver info
4837 </refpurpose>
4838</refnamediv>
4839<refsynopsisdiv>
4840 <title>Synopsis</title>
4841  <programlisting>
4842struct rio_driver {
4843  struct list_head node;
4844  char * name;
4845  const struct rio_device_id * id_table;
4846  int (* probe) (struct rio_dev * dev, const struct rio_device_id * id);
4847  void (* remove) (struct rio_dev * dev);
4848  int (* suspend) (struct rio_dev * dev, u32 state);
4849  int (* resume) (struct rio_dev * dev);
4850  int (* enable_wake) (struct rio_dev * dev, u32 state, int enable);
4851  struct device_driver driver;
4852};  </programlisting>
4853</refsynopsisdiv>
4854 <refsect1>
4855  <title>Members</title>
4856  <variablelist>
4857    <varlistentry>      <term>node</term>
4858      <listitem><para>
4859   Node in list of drivers
4860      </para></listitem>
4861    </varlistentry>
4862    <varlistentry>      <term>name</term>
4863      <listitem><para>
4864   RIO driver name
4865      </para></listitem>
4866    </varlistentry>
4867    <varlistentry>      <term>id_table</term>
4868      <listitem><para>
4869   RIO device ids to be associated with this driver
4870      </para></listitem>
4871    </varlistentry>
4872    <varlistentry>      <term>probe</term>
4873      <listitem><para>
4874   RIO device inserted
4875      </para></listitem>
4876    </varlistentry>
4877    <varlistentry>      <term>remove</term>
4878      <listitem><para>
4879   RIO device removed
4880      </para></listitem>
4881    </varlistentry>
4882    <varlistentry>      <term>suspend</term>
4883      <listitem><para>
4884   RIO device suspended
4885      </para></listitem>
4886    </varlistentry>
4887    <varlistentry>      <term>resume</term>
4888      <listitem><para>
4889   RIO device awakened
4890      </para></listitem>
4891    </varlistentry>
4892    <varlistentry>      <term>enable_wake</term>
4893      <listitem><para>
4894   RIO device enable wake event
4895      </para></listitem>
4896    </varlistentry>
4897    <varlistentry>      <term>driver</term>
4898      <listitem><para>
4899   LDM driver struct
4900      </para></listitem>
4901    </varlistentry>
4902  </variablelist>
4903 </refsect1>
4904<refsect1>
4905<title>Description</title>
4906<para>
4907   Provides info on a RIO device driver for insertion/removal and
4908   power management purposes.
4909</para>
4910</refsect1>
4911</refentry>
4912
4913<refentry id="API-struct-rio-scan">
4914<refentryinfo>
4915 <title>LINUX</title>
4916 <productname>Kernel Hackers Manual</productname>
4917 <date>July 2017</date>
4918</refentryinfo>
4919<refmeta>
4920 <refentrytitle><phrase>struct rio_scan</phrase></refentrytitle>
4921 <manvolnum>9</manvolnum>
4922 <refmiscinfo class="version">4.1.27</refmiscinfo>
4923</refmeta>
4924<refnamediv>
4925 <refname>struct rio_scan</refname>
4926 <refpurpose>
4927     RIO enumeration and discovery operations
4928 </refpurpose>
4929</refnamediv>
4930<refsynopsisdiv>
4931 <title>Synopsis</title>
4932  <programlisting>
4933struct rio_scan {
4934  struct module * owner;
4935  int (* enumerate) (struct rio_mport *mport, u32 flags);
4936  int (* discover) (struct rio_mport *mport, u32 flags);
4937};  </programlisting>
4938</refsynopsisdiv>
4939 <refsect1>
4940  <title>Members</title>
4941  <variablelist>
4942    <varlistentry>      <term>owner</term>
4943      <listitem><para>
4944   The module owner of this structure
4945      </para></listitem>
4946    </varlistentry>
4947    <varlistentry>      <term>enumerate</term>
4948      <listitem><para>
4949   Callback to perform RapidIO fabric enumeration.
4950      </para></listitem>
4951    </varlistentry>
4952    <varlistentry>      <term>discover</term>
4953      <listitem><para>
4954   Callback to perform RapidIO fabric discovery.
4955      </para></listitem>
4956    </varlistentry>
4957  </variablelist>
4958 </refsect1>
4959</refentry>
4960
4961<refentry id="API-struct-rio-scan-node">
4962<refentryinfo>
4963 <title>LINUX</title>
4964 <productname>Kernel Hackers Manual</productname>
4965 <date>July 2017</date>
4966</refentryinfo>
4967<refmeta>
4968 <refentrytitle><phrase>struct rio_scan_node</phrase></refentrytitle>
4969 <manvolnum>9</manvolnum>
4970 <refmiscinfo class="version">4.1.27</refmiscinfo>
4971</refmeta>
4972<refnamediv>
4973 <refname>struct rio_scan_node</refname>
4974 <refpurpose>
4975     list node to register RapidIO enumeration and discovery methods with RapidIO core.
4976 </refpurpose>
4977</refnamediv>
4978<refsynopsisdiv>
4979 <title>Synopsis</title>
4980  <programlisting>
4981struct rio_scan_node {
4982  int mport_id;
4983  struct list_head node;
4984  struct rio_scan * ops;
4985};  </programlisting>
4986</refsynopsisdiv>
4987 <refsect1>
4988  <title>Members</title>
4989  <variablelist>
4990    <varlistentry>      <term>mport_id</term>
4991      <listitem><para>
4992   ID of an mport (net) serviced by this enumerator
4993      </para></listitem>
4994    </varlistentry>
4995    <varlistentry>      <term>node</term>
4996      <listitem><para>
4997   node in global list of registered enumerators
4998      </para></listitem>
4999    </varlistentry>
5000    <varlistentry>      <term>ops</term>
5001      <listitem><para>
5002   RIO enumeration and discovery operations
5003      </para></listitem>
5004    </varlistentry>
5005  </variablelist>
5006 </refsect1>
5007</refentry>
5008
5009     </sect1>
5010     <sect1 id="Enumeration_and_Discovery"><title>Enumeration and Discovery</title>
5011<!-- drivers/rapidio/rio-scan.c -->
5012<refentry id="API-rio-destid-alloc">
5013<refentryinfo>
5014 <title>LINUX</title>
5015 <productname>Kernel Hackers Manual</productname>
5016 <date>July 2017</date>
5017</refentryinfo>
5018<refmeta>
5019 <refentrytitle><phrase>rio_destid_alloc</phrase></refentrytitle>
5020 <manvolnum>9</manvolnum>
5021 <refmiscinfo class="version">4.1.27</refmiscinfo>
5022</refmeta>
5023<refnamediv>
5024 <refname>rio_destid_alloc</refname>
5025 <refpurpose>
5026  Allocate next available destID for given network
5027 </refpurpose>
5028</refnamediv>
5029<refsynopsisdiv>
5030 <title>Synopsis</title>
5031  <funcsynopsis><funcprototype>
5032   <funcdef>u16 <function>rio_destid_alloc </function></funcdef>
5033   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
5034  </funcprototype></funcsynopsis>
5035</refsynopsisdiv>
5036<refsect1>
5037 <title>Arguments</title>
5038 <variablelist>
5039  <varlistentry>
5040   <term><parameter>net</parameter></term>
5041   <listitem>
5042    <para>
5043     RIO network
5044    </para>
5045   </listitem>
5046  </varlistentry>
5047 </variablelist>
5048</refsect1>
5049<refsect1>
5050<title>Description</title>
5051<para>
5052   Returns next available device destination ID for the specified RIO network.
5053   Marks allocated ID as one in use.
5054   Returns RIO_INVALID_DESTID if new destID is not available.
5055</para>
5056</refsect1>
5057</refentry>
5058
5059<refentry id="API-rio-destid-reserve">
5060<refentryinfo>
5061 <title>LINUX</title>
5062 <productname>Kernel Hackers Manual</productname>
5063 <date>July 2017</date>
5064</refentryinfo>
5065<refmeta>
5066 <refentrytitle><phrase>rio_destid_reserve</phrase></refentrytitle>
5067 <manvolnum>9</manvolnum>
5068 <refmiscinfo class="version">4.1.27</refmiscinfo>
5069</refmeta>
5070<refnamediv>
5071 <refname>rio_destid_reserve</refname>
5072 <refpurpose>
5073     Reserve the specivied destID
5074 </refpurpose>
5075</refnamediv>
5076<refsynopsisdiv>
5077 <title>Synopsis</title>
5078  <funcsynopsis><funcprototype>
5079   <funcdef>int <function>rio_destid_reserve </function></funcdef>
5080   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
5081   <paramdef>u16 <parameter>destid</parameter></paramdef>
5082  </funcprototype></funcsynopsis>
5083</refsynopsisdiv>
5084<refsect1>
5085 <title>Arguments</title>
5086 <variablelist>
5087  <varlistentry>
5088   <term><parameter>net</parameter></term>
5089   <listitem>
5090    <para>
5091     RIO network
5092    </para>
5093   </listitem>
5094  </varlistentry>
5095  <varlistentry>
5096   <term><parameter>destid</parameter></term>
5097   <listitem>
5098    <para>
5099     destID to reserve
5100    </para>
5101   </listitem>
5102  </varlistentry>
5103 </variablelist>
5104</refsect1>
5105<refsect1>
5106<title>Description</title>
5107<para>
5108   Tries to reserve the specified destID.
5109   Returns 0 if successfull.
5110</para>
5111</refsect1>
5112</refentry>
5113
5114<refentry id="API-rio-destid-free">
5115<refentryinfo>
5116 <title>LINUX</title>
5117 <productname>Kernel Hackers Manual</productname>
5118 <date>July 2017</date>
5119</refentryinfo>
5120<refmeta>
5121 <refentrytitle><phrase>rio_destid_free</phrase></refentrytitle>
5122 <manvolnum>9</manvolnum>
5123 <refmiscinfo class="version">4.1.27</refmiscinfo>
5124</refmeta>
5125<refnamediv>
5126 <refname>rio_destid_free</refname>
5127 <refpurpose>
5128     free a previously allocated destID
5129 </refpurpose>
5130</refnamediv>
5131<refsynopsisdiv>
5132 <title>Synopsis</title>
5133  <funcsynopsis><funcprototype>
5134   <funcdef>void <function>rio_destid_free </function></funcdef>
5135   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
5136   <paramdef>u16 <parameter>destid</parameter></paramdef>
5137  </funcprototype></funcsynopsis>
5138</refsynopsisdiv>
5139<refsect1>
5140 <title>Arguments</title>
5141 <variablelist>
5142  <varlistentry>
5143   <term><parameter>net</parameter></term>
5144   <listitem>
5145    <para>
5146     RIO network
5147    </para>
5148   </listitem>
5149  </varlistentry>
5150  <varlistentry>
5151   <term><parameter>destid</parameter></term>
5152   <listitem>
5153    <para>
5154     destID to free
5155    </para>
5156   </listitem>
5157  </varlistentry>
5158 </variablelist>
5159</refsect1>
5160<refsect1>
5161<title>Description</title>
5162<para>
5163   Makes the specified destID available for use.
5164</para>
5165</refsect1>
5166</refentry>
5167
5168<refentry id="API-rio-destid-first">
5169<refentryinfo>
5170 <title>LINUX</title>
5171 <productname>Kernel Hackers Manual</productname>
5172 <date>July 2017</date>
5173</refentryinfo>
5174<refmeta>
5175 <refentrytitle><phrase>rio_destid_first</phrase></refentrytitle>
5176 <manvolnum>9</manvolnum>
5177 <refmiscinfo class="version">4.1.27</refmiscinfo>
5178</refmeta>
5179<refnamediv>
5180 <refname>rio_destid_first</refname>
5181 <refpurpose>
5182     return first destID in use
5183 </refpurpose>
5184</refnamediv>
5185<refsynopsisdiv>
5186 <title>Synopsis</title>
5187  <funcsynopsis><funcprototype>
5188   <funcdef>u16 <function>rio_destid_first </function></funcdef>
5189   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
5190  </funcprototype></funcsynopsis>
5191</refsynopsisdiv>
5192<refsect1>
5193 <title>Arguments</title>
5194 <variablelist>
5195  <varlistentry>
5196   <term><parameter>net</parameter></term>
5197   <listitem>
5198    <para>
5199     RIO network
5200    </para>
5201   </listitem>
5202  </varlistentry>
5203 </variablelist>
5204</refsect1>
5205</refentry>
5206
5207<refentry id="API-rio-destid-next">
5208<refentryinfo>
5209 <title>LINUX</title>
5210 <productname>Kernel Hackers Manual</productname>
5211 <date>July 2017</date>
5212</refentryinfo>
5213<refmeta>
5214 <refentrytitle><phrase>rio_destid_next</phrase></refentrytitle>
5215 <manvolnum>9</manvolnum>
5216 <refmiscinfo class="version">4.1.27</refmiscinfo>
5217</refmeta>
5218<refnamediv>
5219 <refname>rio_destid_next</refname>
5220 <refpurpose>
5221     return next destID in use
5222 </refpurpose>
5223</refnamediv>
5224<refsynopsisdiv>
5225 <title>Synopsis</title>
5226  <funcsynopsis><funcprototype>
5227   <funcdef>u16 <function>rio_destid_next </function></funcdef>
5228   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
5229   <paramdef>u16 <parameter>from</parameter></paramdef>
5230  </funcprototype></funcsynopsis>
5231</refsynopsisdiv>
5232<refsect1>
5233 <title>Arguments</title>
5234 <variablelist>
5235  <varlistentry>
5236   <term><parameter>net</parameter></term>
5237   <listitem>
5238    <para>
5239     RIO network
5240    </para>
5241   </listitem>
5242  </varlistentry>
5243  <varlistentry>
5244   <term><parameter>from</parameter></term>
5245   <listitem>
5246    <para>
5247     destination ID from which search shall continue
5248    </para>
5249   </listitem>
5250  </varlistentry>
5251 </variablelist>
5252</refsect1>
5253</refentry>
5254
5255<refentry id="API-rio-get-device-id">
5256<refentryinfo>
5257 <title>LINUX</title>
5258 <productname>Kernel Hackers Manual</productname>
5259 <date>July 2017</date>
5260</refentryinfo>
5261<refmeta>
5262 <refentrytitle><phrase>rio_get_device_id</phrase></refentrytitle>
5263 <manvolnum>9</manvolnum>
5264 <refmiscinfo class="version">4.1.27</refmiscinfo>
5265</refmeta>
5266<refnamediv>
5267 <refname>rio_get_device_id</refname>
5268 <refpurpose>
5269     Get the base/extended device id for a device
5270 </refpurpose>
5271</refnamediv>
5272<refsynopsisdiv>
5273 <title>Synopsis</title>
5274  <funcsynopsis><funcprototype>
5275   <funcdef>u16 <function>rio_get_device_id </function></funcdef>
5276   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
5277   <paramdef>u16 <parameter>destid</parameter></paramdef>
5278   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
5279  </funcprototype></funcsynopsis>
5280</refsynopsisdiv>
5281<refsect1>
5282 <title>Arguments</title>
5283 <variablelist>
5284  <varlistentry>
5285   <term><parameter>port</parameter></term>
5286   <listitem>
5287    <para>
5288     RIO master port
5289    </para>
5290   </listitem>
5291  </varlistentry>
5292  <varlistentry>
5293   <term><parameter>destid</parameter></term>
5294   <listitem>
5295    <para>
5296     Destination ID of device
5297    </para>
5298   </listitem>
5299  </varlistentry>
5300  <varlistentry>
5301   <term><parameter>hopcount</parameter></term>
5302   <listitem>
5303    <para>
5304     Hopcount to device
5305    </para>
5306   </listitem>
5307  </varlistentry>
5308 </variablelist>
5309</refsect1>
5310<refsect1>
5311<title>Description</title>
5312<para>
5313   Reads the base/extended device id from a device. Returns the
5314   8/16-bit device ID.
5315</para>
5316</refsect1>
5317</refentry>
5318
5319<refentry id="API-rio-set-device-id">
5320<refentryinfo>
5321 <title>LINUX</title>
5322 <productname>Kernel Hackers Manual</productname>
5323 <date>July 2017</date>
5324</refentryinfo>
5325<refmeta>
5326 <refentrytitle><phrase>rio_set_device_id</phrase></refentrytitle>
5327 <manvolnum>9</manvolnum>
5328 <refmiscinfo class="version">4.1.27</refmiscinfo>
5329</refmeta>
5330<refnamediv>
5331 <refname>rio_set_device_id</refname>
5332 <refpurpose>
5333     Set the base/extended device id for a device
5334 </refpurpose>
5335</refnamediv>
5336<refsynopsisdiv>
5337 <title>Synopsis</title>
5338  <funcsynopsis><funcprototype>
5339   <funcdef>void <function>rio_set_device_id </function></funcdef>
5340   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
5341   <paramdef>u16 <parameter>destid</parameter></paramdef>
5342   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
5343   <paramdef>u16 <parameter>did</parameter></paramdef>
5344  </funcprototype></funcsynopsis>
5345</refsynopsisdiv>
5346<refsect1>
5347 <title>Arguments</title>
5348 <variablelist>
5349  <varlistentry>
5350   <term><parameter>port</parameter></term>
5351   <listitem>
5352    <para>
5353     RIO master port
5354    </para>
5355   </listitem>
5356  </varlistentry>
5357  <varlistentry>
5358   <term><parameter>destid</parameter></term>
5359   <listitem>
5360    <para>
5361     Destination ID of device
5362    </para>
5363   </listitem>
5364  </varlistentry>
5365  <varlistentry>
5366   <term><parameter>hopcount</parameter></term>
5367   <listitem>
5368    <para>
5369     Hopcount to device
5370    </para>
5371   </listitem>
5372  </varlistentry>
5373  <varlistentry>
5374   <term><parameter>did</parameter></term>
5375   <listitem>
5376    <para>
5377     Device ID value to be written
5378    </para>
5379   </listitem>
5380  </varlistentry>
5381 </variablelist>
5382</refsect1>
5383<refsect1>
5384<title>Description</title>
5385<para>
5386   Writes the base/extended device id from a device.
5387</para>
5388</refsect1>
5389</refentry>
5390
5391<refentry id="API-rio-local-set-device-id">
5392<refentryinfo>
5393 <title>LINUX</title>
5394 <productname>Kernel Hackers Manual</productname>
5395 <date>July 2017</date>
5396</refentryinfo>
5397<refmeta>
5398 <refentrytitle><phrase>rio_local_set_device_id</phrase></refentrytitle>
5399 <manvolnum>9</manvolnum>
5400 <refmiscinfo class="version">4.1.27</refmiscinfo>
5401</refmeta>
5402<refnamediv>
5403 <refname>rio_local_set_device_id</refname>
5404 <refpurpose>
5405     Set the base/extended device id for a port
5406 </refpurpose>
5407</refnamediv>
5408<refsynopsisdiv>
5409 <title>Synopsis</title>
5410  <funcsynopsis><funcprototype>
5411   <funcdef>void <function>rio_local_set_device_id </function></funcdef>
5412   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
5413   <paramdef>u16 <parameter>did</parameter></paramdef>
5414  </funcprototype></funcsynopsis>
5415</refsynopsisdiv>
5416<refsect1>
5417 <title>Arguments</title>
5418 <variablelist>
5419  <varlistentry>
5420   <term><parameter>port</parameter></term>
5421   <listitem>
5422    <para>
5423     RIO master port
5424    </para>
5425   </listitem>
5426  </varlistentry>
5427  <varlistentry>
5428   <term><parameter>did</parameter></term>
5429   <listitem>
5430    <para>
5431     Device ID value to be written
5432    </para>
5433   </listitem>
5434  </varlistentry>
5435 </variablelist>
5436</refsect1>
5437<refsect1>
5438<title>Description</title>
5439<para>
5440   Writes the base/extended device id from a device.
5441</para>
5442</refsect1>
5443</refentry>
5444
5445<refentry id="API-rio-clear-locks">
5446<refentryinfo>
5447 <title>LINUX</title>
5448 <productname>Kernel Hackers Manual</productname>
5449 <date>July 2017</date>
5450</refentryinfo>
5451<refmeta>
5452 <refentrytitle><phrase>rio_clear_locks</phrase></refentrytitle>
5453 <manvolnum>9</manvolnum>
5454 <refmiscinfo class="version">4.1.27</refmiscinfo>
5455</refmeta>
5456<refnamediv>
5457 <refname>rio_clear_locks</refname>
5458 <refpurpose>
5459     Release all host locks and signal enumeration complete
5460 </refpurpose>
5461</refnamediv>
5462<refsynopsisdiv>
5463 <title>Synopsis</title>
5464  <funcsynopsis><funcprototype>
5465   <funcdef>int <function>rio_clear_locks </function></funcdef>
5466   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
5467  </funcprototype></funcsynopsis>
5468</refsynopsisdiv>
5469<refsect1>
5470 <title>Arguments</title>
5471 <variablelist>
5472  <varlistentry>
5473   <term><parameter>net</parameter></term>
5474   <listitem>
5475    <para>
5476     RIO network to run on
5477    </para>
5478   </listitem>
5479  </varlistentry>
5480 </variablelist>
5481</refsect1>
5482<refsect1>
5483<title>Description</title>
5484<para>
5485   Marks the component tag CSR on each device with the enumeration
5486   complete flag. When complete, it then release the host locks on
5487   each device. Returns 0 on success or <constant>-EINVAL</constant> on failure.
5488</para>
5489</refsect1>
5490</refentry>
5491
5492<refentry id="API-rio-enum-host">
5493<refentryinfo>
5494 <title>LINUX</title>
5495 <productname>Kernel Hackers Manual</productname>
5496 <date>July 2017</date>
5497</refentryinfo>
5498<refmeta>
5499 <refentrytitle><phrase>rio_enum_host</phrase></refentrytitle>
5500 <manvolnum>9</manvolnum>
5501 <refmiscinfo class="version">4.1.27</refmiscinfo>
5502</refmeta>
5503<refnamediv>
5504 <refname>rio_enum_host</refname>
5505 <refpurpose>
5506     Set host lock and initialize host destination ID
5507 </refpurpose>
5508</refnamediv>
5509<refsynopsisdiv>
5510 <title>Synopsis</title>
5511  <funcsynopsis><funcprototype>
5512   <funcdef>int <function>rio_enum_host </function></funcdef>
5513   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
5514  </funcprototype></funcsynopsis>
5515</refsynopsisdiv>
5516<refsect1>
5517 <title>Arguments</title>
5518 <variablelist>
5519  <varlistentry>
5520   <term><parameter>port</parameter></term>
5521   <listitem>
5522    <para>
5523     Master port to issue transaction
5524    </para>
5525   </listitem>
5526  </varlistentry>
5527 </variablelist>
5528</refsect1>
5529<refsect1>
5530<title>Description</title>
5531<para>
5532   Sets the local host master port lock and destination ID register
5533   with the host device ID value. The host device ID value is provided
5534   by the platform. Returns <constant>0</constant> on success or <constant>-1</constant> on failure.
5535</para>
5536</refsect1>
5537</refentry>
5538
5539<refentry id="API-rio-device-has-destid">
5540<refentryinfo>
5541 <title>LINUX</title>
5542 <productname>Kernel Hackers Manual</productname>
5543 <date>July 2017</date>
5544</refentryinfo>
5545<refmeta>
5546 <refentrytitle><phrase>rio_device_has_destid</phrase></refentrytitle>
5547 <manvolnum>9</manvolnum>
5548 <refmiscinfo class="version">4.1.27</refmiscinfo>
5549</refmeta>
5550<refnamediv>
5551 <refname>rio_device_has_destid</refname>
5552 <refpurpose>
5553     Test if a device contains a destination ID register
5554 </refpurpose>
5555</refnamediv>
5556<refsynopsisdiv>
5557 <title>Synopsis</title>
5558  <funcsynopsis><funcprototype>
5559   <funcdef>int <function>rio_device_has_destid </function></funcdef>
5560   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
5561   <paramdef>int <parameter>src_ops</parameter></paramdef>
5562   <paramdef>int <parameter>dst_ops</parameter></paramdef>
5563  </funcprototype></funcsynopsis>
5564</refsynopsisdiv>
5565<refsect1>
5566 <title>Arguments</title>
5567 <variablelist>
5568  <varlistentry>
5569   <term><parameter>port</parameter></term>
5570   <listitem>
5571    <para>
5572     Master port to issue transaction
5573    </para>
5574   </listitem>
5575  </varlistentry>
5576  <varlistentry>
5577   <term><parameter>src_ops</parameter></term>
5578   <listitem>
5579    <para>
5580     RIO device source operations
5581    </para>
5582   </listitem>
5583  </varlistentry>
5584  <varlistentry>
5585   <term><parameter>dst_ops</parameter></term>
5586   <listitem>
5587    <para>
5588     RIO device destination operations
5589    </para>
5590   </listitem>
5591  </varlistentry>
5592 </variablelist>
5593</refsect1>
5594<refsect1>
5595<title>Description</title>
5596<para>
5597   Checks the provided <parameter>src_ops</parameter> and <parameter>dst_ops</parameter> for the necessary transaction
5598   capabilities that indicate whether or not a device will implement a
5599   destination ID register. Returns 1 if true or 0 if false.
5600</para>
5601</refsect1>
5602</refentry>
5603
5604<refentry id="API-rio-release-dev">
5605<refentryinfo>
5606 <title>LINUX</title>
5607 <productname>Kernel Hackers Manual</productname>
5608 <date>July 2017</date>
5609</refentryinfo>
5610<refmeta>
5611 <refentrytitle><phrase>rio_release_dev</phrase></refentrytitle>
5612 <manvolnum>9</manvolnum>
5613 <refmiscinfo class="version">4.1.27</refmiscinfo>
5614</refmeta>
5615<refnamediv>
5616 <refname>rio_release_dev</refname>
5617 <refpurpose>
5618     Frees a RIO device struct
5619 </refpurpose>
5620</refnamediv>
5621<refsynopsisdiv>
5622 <title>Synopsis</title>
5623  <funcsynopsis><funcprototype>
5624   <funcdef>void <function>rio_release_dev </function></funcdef>
5625   <paramdef>struct device * <parameter>dev</parameter></paramdef>
5626  </funcprototype></funcsynopsis>
5627</refsynopsisdiv>
5628<refsect1>
5629 <title>Arguments</title>
5630 <variablelist>
5631  <varlistentry>
5632   <term><parameter>dev</parameter></term>
5633   <listitem>
5634    <para>
5635     LDM device associated with a RIO device struct
5636    </para>
5637   </listitem>
5638  </varlistentry>
5639 </variablelist>
5640</refsect1>
5641<refsect1>
5642<title>Description</title>
5643<para>
5644   Gets the RIO device struct associated a RIO device struct.
5645   The RIO device struct is freed.
5646</para>
5647</refsect1>
5648</refentry>
5649
5650<refentry id="API-rio-is-switch">
5651<refentryinfo>
5652 <title>LINUX</title>
5653 <productname>Kernel Hackers Manual</productname>
5654 <date>July 2017</date>
5655</refentryinfo>
5656<refmeta>
5657 <refentrytitle><phrase>rio_is_switch</phrase></refentrytitle>
5658 <manvolnum>9</manvolnum>
5659 <refmiscinfo class="version">4.1.27</refmiscinfo>
5660</refmeta>
5661<refnamediv>
5662 <refname>rio_is_switch</refname>
5663 <refpurpose>
5664     Tests if a RIO device has switch capabilities
5665 </refpurpose>
5666</refnamediv>
5667<refsynopsisdiv>
5668 <title>Synopsis</title>
5669  <funcsynopsis><funcprototype>
5670   <funcdef>int <function>rio_is_switch </function></funcdef>
5671   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
5672  </funcprototype></funcsynopsis>
5673</refsynopsisdiv>
5674<refsect1>
5675 <title>Arguments</title>
5676 <variablelist>
5677  <varlistentry>
5678   <term><parameter>rdev</parameter></term>
5679   <listitem>
5680    <para>
5681     RIO device
5682    </para>
5683   </listitem>
5684  </varlistentry>
5685 </variablelist>
5686</refsect1>
5687<refsect1>
5688<title>Description</title>
5689<para>
5690   Gets the RIO device Processing Element Features register
5691   contents and tests for switch capabilities. Returns 1 if
5692   the device is a switch or 0 if it is not a switch.
5693   The RIO device struct is freed.
5694</para>
5695</refsect1>
5696</refentry>
5697
5698<refentry id="API-rio-setup-device">
5699<refentryinfo>
5700 <title>LINUX</title>
5701 <productname>Kernel Hackers Manual</productname>
5702 <date>July 2017</date>
5703</refentryinfo>
5704<refmeta>
5705 <refentrytitle><phrase>rio_setup_device</phrase></refentrytitle>
5706 <manvolnum>9</manvolnum>
5707 <refmiscinfo class="version">4.1.27</refmiscinfo>
5708</refmeta>
5709<refnamediv>
5710 <refname>rio_setup_device</refname>
5711 <refpurpose>
5712     Allocates and sets up a RIO device
5713 </refpurpose>
5714</refnamediv>
5715<refsynopsisdiv>
5716 <title>Synopsis</title>
5717  <funcsynopsis><funcprototype>
5718   <funcdef>struct rio_dev * <function>rio_setup_device </function></funcdef>
5719   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
5720   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
5721   <paramdef>u16 <parameter>destid</parameter></paramdef>
5722   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
5723   <paramdef>int <parameter>do_enum</parameter></paramdef>
5724  </funcprototype></funcsynopsis>
5725</refsynopsisdiv>
5726<refsect1>
5727 <title>Arguments</title>
5728 <variablelist>
5729  <varlistentry>
5730   <term><parameter>net</parameter></term>
5731   <listitem>
5732    <para>
5733     RIO network
5734    </para>
5735   </listitem>
5736  </varlistentry>
5737  <varlistentry>
5738   <term><parameter>port</parameter></term>
5739   <listitem>
5740    <para>
5741     Master port to send transactions
5742    </para>
5743   </listitem>
5744  </varlistentry>
5745  <varlistentry>
5746   <term><parameter>destid</parameter></term>
5747   <listitem>
5748    <para>
5749     Current destination ID
5750    </para>
5751   </listitem>
5752  </varlistentry>
5753  <varlistentry>
5754   <term><parameter>hopcount</parameter></term>
5755   <listitem>
5756    <para>
5757     Current hopcount
5758    </para>
5759   </listitem>
5760  </varlistentry>
5761  <varlistentry>
5762   <term><parameter>do_enum</parameter></term>
5763   <listitem>
5764    <para>
5765     Enumeration/Discovery mode flag
5766    </para>
5767   </listitem>
5768  </varlistentry>
5769 </variablelist>
5770</refsect1>
5771<refsect1>
5772<title>Description</title>
5773<para>
5774   Allocates a RIO device and configures fields based on configuration
5775   space contents. If device has a destination ID register, a destination
5776   ID is either assigned in enumeration mode or read from configuration
5777   space in discovery mode.  If the device has switch capabilities, then
5778   a switch is allocated and configured appropriately. Returns a pointer
5779   to a RIO device on success or NULL on failure.
5780</para>
5781</refsect1>
5782</refentry>
5783
5784<refentry id="API-rio-sport-is-active">
5785<refentryinfo>
5786 <title>LINUX</title>
5787 <productname>Kernel Hackers Manual</productname>
5788 <date>July 2017</date>
5789</refentryinfo>
5790<refmeta>
5791 <refentrytitle><phrase>rio_sport_is_active</phrase></refentrytitle>
5792 <manvolnum>9</manvolnum>
5793 <refmiscinfo class="version">4.1.27</refmiscinfo>
5794</refmeta>
5795<refnamediv>
5796 <refname>rio_sport_is_active</refname>
5797 <refpurpose>
5798     Tests if a switch port has an active connection.
5799 </refpurpose>
5800</refnamediv>
5801<refsynopsisdiv>
5802 <title>Synopsis</title>
5803  <funcsynopsis><funcprototype>
5804   <funcdef>int <function>rio_sport_is_active </function></funcdef>
5805   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
5806   <paramdef>u16 <parameter>destid</parameter></paramdef>
5807   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
5808   <paramdef>int <parameter>sport</parameter></paramdef>
5809  </funcprototype></funcsynopsis>
5810</refsynopsisdiv>
5811<refsect1>
5812 <title>Arguments</title>
5813 <variablelist>
5814  <varlistentry>
5815   <term><parameter>port</parameter></term>
5816   <listitem>
5817    <para>
5818     Master port to send transaction
5819    </para>
5820   </listitem>
5821  </varlistentry>
5822  <varlistentry>
5823   <term><parameter>destid</parameter></term>
5824   <listitem>
5825    <para>
5826     Associated destination ID for switch
5827    </para>
5828   </listitem>
5829  </varlistentry>
5830  <varlistentry>
5831   <term><parameter>hopcount</parameter></term>
5832   <listitem>
5833    <para>
5834     Hopcount to reach switch
5835    </para>
5836   </listitem>
5837  </varlistentry>
5838  <varlistentry>
5839   <term><parameter>sport</parameter></term>
5840   <listitem>
5841    <para>
5842     Switch port number
5843    </para>
5844   </listitem>
5845  </varlistentry>
5846 </variablelist>
5847</refsect1>
5848<refsect1>
5849<title>Description</title>
5850<para>
5851   Reads the port error status CSR for a particular switch port to
5852   determine if the port has an active link.  Returns
5853   <constant>RIO_PORT_N_ERR_STS_PORT_OK</constant> if the port is active or <constant>0</constant> if it is
5854   inactive.
5855</para>
5856</refsect1>
5857</refentry>
5858
5859<refentry id="API-rio-get-host-deviceid-lock">
5860<refentryinfo>
5861 <title>LINUX</title>
5862 <productname>Kernel Hackers Manual</productname>
5863 <date>July 2017</date>
5864</refentryinfo>
5865<refmeta>
5866 <refentrytitle><phrase>rio_get_host_deviceid_lock</phrase></refentrytitle>
5867 <manvolnum>9</manvolnum>
5868 <refmiscinfo class="version">4.1.27</refmiscinfo>
5869</refmeta>
5870<refnamediv>
5871 <refname>rio_get_host_deviceid_lock</refname>
5872 <refpurpose>
5873     Reads the Host Device ID Lock CSR on a device
5874 </refpurpose>
5875</refnamediv>
5876<refsynopsisdiv>
5877 <title>Synopsis</title>
5878  <funcsynopsis><funcprototype>
5879   <funcdef>u16 <function>rio_get_host_deviceid_lock </function></funcdef>
5880   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
5881   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
5882  </funcprototype></funcsynopsis>
5883</refsynopsisdiv>
5884<refsect1>
5885 <title>Arguments</title>
5886 <variablelist>
5887  <varlistentry>
5888   <term><parameter>port</parameter></term>
5889   <listitem>
5890    <para>
5891     Master port to send transaction
5892    </para>
5893   </listitem>
5894  </varlistentry>
5895  <varlistentry>
5896   <term><parameter>hopcount</parameter></term>
5897   <listitem>
5898    <para>
5899     Number of hops to the device
5900    </para>
5901   </listitem>
5902  </varlistentry>
5903 </variablelist>
5904</refsect1>
5905<refsect1>
5906<title>Description</title>
5907<para>
5908   Used during enumeration to read the Host Device ID Lock CSR on a
5909   RIO device. Returns the value of the lock register.
5910</para>
5911</refsect1>
5912</refentry>
5913
5914<refentry id="API-rio-enum-peer">
5915<refentryinfo>
5916 <title>LINUX</title>
5917 <productname>Kernel Hackers Manual</productname>
5918 <date>July 2017</date>
5919</refentryinfo>
5920<refmeta>
5921 <refentrytitle><phrase>rio_enum_peer</phrase></refentrytitle>
5922 <manvolnum>9</manvolnum>
5923 <refmiscinfo class="version">4.1.27</refmiscinfo>
5924</refmeta>
5925<refnamediv>
5926 <refname>rio_enum_peer</refname>
5927 <refpurpose>
5928     Recursively enumerate a RIO network through a master port
5929 </refpurpose>
5930</refnamediv>
5931<refsynopsisdiv>
5932 <title>Synopsis</title>
5933  <funcsynopsis><funcprototype>
5934   <funcdef>int <function>rio_enum_peer </function></funcdef>
5935   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
5936   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
5937   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
5938   <paramdef>struct rio_dev * <parameter>prev</parameter></paramdef>
5939   <paramdef>int <parameter>prev_port</parameter></paramdef>
5940  </funcprototype></funcsynopsis>
5941</refsynopsisdiv>
5942<refsect1>
5943 <title>Arguments</title>
5944 <variablelist>
5945  <varlistentry>
5946   <term><parameter>net</parameter></term>
5947   <listitem>
5948    <para>
5949     RIO network being enumerated
5950    </para>
5951   </listitem>
5952  </varlistentry>
5953  <varlistentry>
5954   <term><parameter>port</parameter></term>
5955   <listitem>
5956    <para>
5957     Master port to send transactions
5958    </para>
5959   </listitem>
5960  </varlistentry>
5961  <varlistentry>
5962   <term><parameter>hopcount</parameter></term>
5963   <listitem>
5964    <para>
5965     Number of hops into the network
5966    </para>
5967   </listitem>
5968  </varlistentry>
5969  <varlistentry>
5970   <term><parameter>prev</parameter></term>
5971   <listitem>
5972    <para>
5973     Previous RIO device connected to the enumerated one
5974    </para>
5975   </listitem>
5976  </varlistentry>
5977  <varlistentry>
5978   <term><parameter>prev_port</parameter></term>
5979   <listitem>
5980    <para>
5981     Port on previous RIO device
5982    </para>
5983   </listitem>
5984  </varlistentry>
5985 </variablelist>
5986</refsect1>
5987<refsect1>
5988<title>Description</title>
5989<para>
5990   Recursively enumerates a RIO network.  Transactions are sent via the
5991   master port passed in <parameter>port</parameter>.
5992</para>
5993</refsect1>
5994</refentry>
5995
5996<refentry id="API-rio-enum-complete">
5997<refentryinfo>
5998 <title>LINUX</title>
5999 <productname>Kernel Hackers Manual</productname>
6000 <date>July 2017</date>
6001</refentryinfo>
6002<refmeta>
6003 <refentrytitle><phrase>rio_enum_complete</phrase></refentrytitle>
6004 <manvolnum>9</manvolnum>
6005 <refmiscinfo class="version">4.1.27</refmiscinfo>
6006</refmeta>
6007<refnamediv>
6008 <refname>rio_enum_complete</refname>
6009 <refpurpose>
6010     Tests if enumeration of a network is complete
6011 </refpurpose>
6012</refnamediv>
6013<refsynopsisdiv>
6014 <title>Synopsis</title>
6015  <funcsynopsis><funcprototype>
6016   <funcdef>int <function>rio_enum_complete </function></funcdef>
6017   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
6018  </funcprototype></funcsynopsis>
6019</refsynopsisdiv>
6020<refsect1>
6021 <title>Arguments</title>
6022 <variablelist>
6023  <varlistentry>
6024   <term><parameter>port</parameter></term>
6025   <listitem>
6026    <para>
6027     Master port to send transaction
6028    </para>
6029   </listitem>
6030  </varlistentry>
6031 </variablelist>
6032</refsect1>
6033<refsect1>
6034<title>Description</title>
6035<para>
6036   Tests the PGCCSR discovered bit for non-zero value (enumeration
6037   complete flag). Return <constant>1</constant> if enumeration is complete or <constant>0</constant> if
6038   enumeration is incomplete.
6039</para>
6040</refsect1>
6041</refentry>
6042
6043<refentry id="API-rio-disc-peer">
6044<refentryinfo>
6045 <title>LINUX</title>
6046 <productname>Kernel Hackers Manual</productname>
6047 <date>July 2017</date>
6048</refentryinfo>
6049<refmeta>
6050 <refentrytitle><phrase>rio_disc_peer</phrase></refentrytitle>
6051 <manvolnum>9</manvolnum>
6052 <refmiscinfo class="version">4.1.27</refmiscinfo>
6053</refmeta>
6054<refnamediv>
6055 <refname>rio_disc_peer</refname>
6056 <refpurpose>
6057     Recursively discovers a RIO network through a master port
6058 </refpurpose>
6059</refnamediv>
6060<refsynopsisdiv>
6061 <title>Synopsis</title>
6062  <funcsynopsis><funcprototype>
6063   <funcdef>int <function>rio_disc_peer </function></funcdef>
6064   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
6065   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
6066   <paramdef>u16 <parameter>destid</parameter></paramdef>
6067   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
6068   <paramdef>struct rio_dev * <parameter>prev</parameter></paramdef>
6069   <paramdef>int <parameter>prev_port</parameter></paramdef>
6070  </funcprototype></funcsynopsis>
6071</refsynopsisdiv>
6072<refsect1>
6073 <title>Arguments</title>
6074 <variablelist>
6075  <varlistentry>
6076   <term><parameter>net</parameter></term>
6077   <listitem>
6078    <para>
6079     RIO network being discovered
6080    </para>
6081   </listitem>
6082  </varlistentry>
6083  <varlistentry>
6084   <term><parameter>port</parameter></term>
6085   <listitem>
6086    <para>
6087     Master port to send transactions
6088    </para>
6089   </listitem>
6090  </varlistentry>
6091  <varlistentry>
6092   <term><parameter>destid</parameter></term>
6093   <listitem>
6094    <para>
6095     Current destination ID in network
6096    </para>
6097   </listitem>
6098  </varlistentry>
6099  <varlistentry>
6100   <term><parameter>hopcount</parameter></term>
6101   <listitem>
6102    <para>
6103     Number of hops into the network
6104    </para>
6105   </listitem>
6106  </varlistentry>
6107  <varlistentry>
6108   <term><parameter>prev</parameter></term>
6109   <listitem>
6110    <para>
6111     previous rio_dev
6112    </para>
6113   </listitem>
6114  </varlistentry>
6115  <varlistentry>
6116   <term><parameter>prev_port</parameter></term>
6117   <listitem>
6118    <para>
6119     previous port number
6120    </para>
6121   </listitem>
6122  </varlistentry>
6123 </variablelist>
6124</refsect1>
6125<refsect1>
6126<title>Description</title>
6127<para>
6128   Recursively discovers a RIO network.  Transactions are sent via the
6129   master port passed in <parameter>port</parameter>.
6130</para>
6131</refsect1>
6132</refentry>
6133
6134<refentry id="API-rio-mport-is-active">
6135<refentryinfo>
6136 <title>LINUX</title>
6137 <productname>Kernel Hackers Manual</productname>
6138 <date>July 2017</date>
6139</refentryinfo>
6140<refmeta>
6141 <refentrytitle><phrase>rio_mport_is_active</phrase></refentrytitle>
6142 <manvolnum>9</manvolnum>
6143 <refmiscinfo class="version">4.1.27</refmiscinfo>
6144</refmeta>
6145<refnamediv>
6146 <refname>rio_mport_is_active</refname>
6147 <refpurpose>
6148     Tests if master port link is active
6149 </refpurpose>
6150</refnamediv>
6151<refsynopsisdiv>
6152 <title>Synopsis</title>
6153  <funcsynopsis><funcprototype>
6154   <funcdef>int <function>rio_mport_is_active </function></funcdef>
6155   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
6156  </funcprototype></funcsynopsis>
6157</refsynopsisdiv>
6158<refsect1>
6159 <title>Arguments</title>
6160 <variablelist>
6161  <varlistentry>
6162   <term><parameter>port</parameter></term>
6163   <listitem>
6164    <para>
6165     Master port to test
6166    </para>
6167   </listitem>
6168  </varlistentry>
6169 </variablelist>
6170</refsect1>
6171<refsect1>
6172<title>Description</title>
6173<para>
6174   Reads the port error status CSR for the master port to
6175   determine if the port has an active link.  Returns
6176   <constant>RIO_PORT_N_ERR_STS_PORT_OK</constant> if the  master port is active
6177   or <constant>0</constant> if it is inactive.
6178</para>
6179</refsect1>
6180</refentry>
6181
6182<refentry id="API-rio-alloc-net">
6183<refentryinfo>
6184 <title>LINUX</title>
6185 <productname>Kernel Hackers Manual</productname>
6186 <date>July 2017</date>
6187</refentryinfo>
6188<refmeta>
6189 <refentrytitle><phrase>rio_alloc_net</phrase></refentrytitle>
6190 <manvolnum>9</manvolnum>
6191 <refmiscinfo class="version">4.1.27</refmiscinfo>
6192</refmeta>
6193<refnamediv>
6194 <refname>rio_alloc_net</refname>
6195 <refpurpose>
6196     Allocate and configure a new RIO network
6197 </refpurpose>
6198</refnamediv>
6199<refsynopsisdiv>
6200 <title>Synopsis</title>
6201  <funcsynopsis><funcprototype>
6202   <funcdef>struct rio_net * <function>rio_alloc_net </function></funcdef>
6203   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
6204   <paramdef>int <parameter>do_enum</parameter></paramdef>
6205   <paramdef>u16 <parameter>start</parameter></paramdef>
6206  </funcprototype></funcsynopsis>
6207</refsynopsisdiv>
6208<refsect1>
6209 <title>Arguments</title>
6210 <variablelist>
6211  <varlistentry>
6212   <term><parameter>port</parameter></term>
6213   <listitem>
6214    <para>
6215     Master port associated with the RIO network
6216    </para>
6217   </listitem>
6218  </varlistentry>
6219  <varlistentry>
6220   <term><parameter>do_enum</parameter></term>
6221   <listitem>
6222    <para>
6223     Enumeration/Discovery mode flag
6224    </para>
6225   </listitem>
6226  </varlistentry>
6227  <varlistentry>
6228   <term><parameter>start</parameter></term>
6229   <listitem>
6230    <para>
6231     logical minimal start id for new net
6232    </para>
6233   </listitem>
6234  </varlistentry>
6235 </variablelist>
6236</refsect1>
6237<refsect1>
6238<title>Description</title>
6239<para>
6240   Allocates a RIO network structure, initializes per-network
6241   list heads, and adds the associated master port to the
6242   network list of associated master ports. Returns a
6243   RIO network pointer on success or <constant>NULL</constant> on failure.
6244</para>
6245</refsect1>
6246</refentry>
6247
6248<refentry id="API-rio-update-route-tables">
6249<refentryinfo>
6250 <title>LINUX</title>
6251 <productname>Kernel Hackers Manual</productname>
6252 <date>July 2017</date>
6253</refentryinfo>
6254<refmeta>
6255 <refentrytitle><phrase>rio_update_route_tables</phrase></refentrytitle>
6256 <manvolnum>9</manvolnum>
6257 <refmiscinfo class="version">4.1.27</refmiscinfo>
6258</refmeta>
6259<refnamediv>
6260 <refname>rio_update_route_tables</refname>
6261 <refpurpose>
6262     Updates route tables in switches
6263 </refpurpose>
6264</refnamediv>
6265<refsynopsisdiv>
6266 <title>Synopsis</title>
6267  <funcsynopsis><funcprototype>
6268   <funcdef>void <function>rio_update_route_tables </function></funcdef>
6269   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
6270  </funcprototype></funcsynopsis>
6271</refsynopsisdiv>
6272<refsect1>
6273 <title>Arguments</title>
6274 <variablelist>
6275  <varlistentry>
6276   <term><parameter>net</parameter></term>
6277   <listitem>
6278    <para>
6279     RIO network to run update on
6280    </para>
6281   </listitem>
6282  </varlistentry>
6283 </variablelist>
6284</refsect1>
6285<refsect1>
6286<title>Description</title>
6287<para>
6288   For each enumerated device, ensure that each switch in a system
6289   has correct routing entries. Add routes for devices that where
6290   unknown dirung the first enumeration pass through the switch.
6291</para>
6292</refsect1>
6293</refentry>
6294
6295<refentry id="API-rio-init-em">
6296<refentryinfo>
6297 <title>LINUX</title>
6298 <productname>Kernel Hackers Manual</productname>
6299 <date>July 2017</date>
6300</refentryinfo>
6301<refmeta>
6302 <refentrytitle><phrase>rio_init_em</phrase></refentrytitle>
6303 <manvolnum>9</manvolnum>
6304 <refmiscinfo class="version">4.1.27</refmiscinfo>
6305</refmeta>
6306<refnamediv>
6307 <refname>rio_init_em</refname>
6308 <refpurpose>
6309     Initializes RIO Error Management (for switches)
6310 </refpurpose>
6311</refnamediv>
6312<refsynopsisdiv>
6313 <title>Synopsis</title>
6314  <funcsynopsis><funcprototype>
6315   <funcdef>void <function>rio_init_em </function></funcdef>
6316   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
6317  </funcprototype></funcsynopsis>
6318</refsynopsisdiv>
6319<refsect1>
6320 <title>Arguments</title>
6321 <variablelist>
6322  <varlistentry>
6323   <term><parameter>rdev</parameter></term>
6324   <listitem>
6325    <para>
6326     RIO device
6327    </para>
6328   </listitem>
6329  </varlistentry>
6330 </variablelist>
6331</refsect1>
6332<refsect1>
6333<title>Description</title>
6334<para>
6335   For each enumerated switch, call device-specific error management
6336   initialization routine (if supplied by the switch driver).
6337</para>
6338</refsect1>
6339</refentry>
6340
6341<refentry id="API-rio-pw-enable">
6342<refentryinfo>
6343 <title>LINUX</title>
6344 <productname>Kernel Hackers Manual</productname>
6345 <date>July 2017</date>
6346</refentryinfo>
6347<refmeta>
6348 <refentrytitle><phrase>rio_pw_enable</phrase></refentrytitle>
6349 <manvolnum>9</manvolnum>
6350 <refmiscinfo class="version">4.1.27</refmiscinfo>
6351</refmeta>
6352<refnamediv>
6353 <refname>rio_pw_enable</refname>
6354 <refpurpose>
6355     Enables/disables port-write handling by a master port
6356 </refpurpose>
6357</refnamediv>
6358<refsynopsisdiv>
6359 <title>Synopsis</title>
6360  <funcsynopsis><funcprototype>
6361   <funcdef>void <function>rio_pw_enable </function></funcdef>
6362   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
6363   <paramdef>int <parameter>enable</parameter></paramdef>
6364  </funcprototype></funcsynopsis>
6365</refsynopsisdiv>
6366<refsect1>
6367 <title>Arguments</title>
6368 <variablelist>
6369  <varlistentry>
6370   <term><parameter>port</parameter></term>
6371   <listitem>
6372    <para>
6373     Master port associated with port-write handling
6374    </para>
6375   </listitem>
6376  </varlistentry>
6377  <varlistentry>
6378   <term><parameter>enable</parameter></term>
6379   <listitem>
6380    <para>
6381     1=enable,  0=disable
6382    </para>
6383   </listitem>
6384  </varlistentry>
6385 </variablelist>
6386</refsect1>
6387</refentry>
6388
6389<refentry id="API-rio-enum-mport">
6390<refentryinfo>
6391 <title>LINUX</title>
6392 <productname>Kernel Hackers Manual</productname>
6393 <date>July 2017</date>
6394</refentryinfo>
6395<refmeta>
6396 <refentrytitle><phrase>rio_enum_mport</phrase></refentrytitle>
6397 <manvolnum>9</manvolnum>
6398 <refmiscinfo class="version">4.1.27</refmiscinfo>
6399</refmeta>
6400<refnamediv>
6401 <refname>rio_enum_mport</refname>
6402 <refpurpose>
6403     Start enumeration through a master port
6404 </refpurpose>
6405</refnamediv>
6406<refsynopsisdiv>
6407 <title>Synopsis</title>
6408  <funcsynopsis><funcprototype>
6409   <funcdef>int <function>rio_enum_mport </function></funcdef>
6410   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
6411   <paramdef>u32 <parameter>flags</parameter></paramdef>
6412  </funcprototype></funcsynopsis>
6413</refsynopsisdiv>
6414<refsect1>
6415 <title>Arguments</title>
6416 <variablelist>
6417  <varlistentry>
6418   <term><parameter>mport</parameter></term>
6419   <listitem>
6420    <para>
6421     Master port to send transactions
6422    </para>
6423   </listitem>
6424  </varlistentry>
6425  <varlistentry>
6426   <term><parameter>flags</parameter></term>
6427   <listitem>
6428    <para>
6429     Enumeration control flags
6430    </para>
6431   </listitem>
6432  </varlistentry>
6433 </variablelist>
6434</refsect1>
6435<refsect1>
6436<title>Description</title>
6437<para>
6438   Starts the enumeration process. If somebody has enumerated our
6439   master port device, then give up. If not and we have an active
6440   link, then start recursive peer enumeration. Returns <constant>0</constant> if
6441   enumeration succeeds or <constant>-EBUSY</constant> if enumeration fails.
6442</para>
6443</refsect1>
6444</refentry>
6445
6446<refentry id="API-rio-build-route-tables">
6447<refentryinfo>
6448 <title>LINUX</title>
6449 <productname>Kernel Hackers Manual</productname>
6450 <date>July 2017</date>
6451</refentryinfo>
6452<refmeta>
6453 <refentrytitle><phrase>rio_build_route_tables</phrase></refentrytitle>
6454 <manvolnum>9</manvolnum>
6455 <refmiscinfo class="version">4.1.27</refmiscinfo>
6456</refmeta>
6457<refnamediv>
6458 <refname>rio_build_route_tables</refname>
6459 <refpurpose>
6460     Generate route tables from switch route entries
6461 </refpurpose>
6462</refnamediv>
6463<refsynopsisdiv>
6464 <title>Synopsis</title>
6465  <funcsynopsis><funcprototype>
6466   <funcdef>void <function>rio_build_route_tables </function></funcdef>
6467   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
6468  </funcprototype></funcsynopsis>
6469</refsynopsisdiv>
6470<refsect1>
6471 <title>Arguments</title>
6472 <variablelist>
6473  <varlistentry>
6474   <term><parameter>net</parameter></term>
6475   <listitem>
6476    <para>
6477     RIO network to run route tables scan on
6478    </para>
6479   </listitem>
6480  </varlistentry>
6481 </variablelist>
6482</refsect1>
6483<refsect1>
6484<title>Description</title>
6485<para>
6486   For each switch device, generate a route table by copying existing
6487   route entries from the switch.
6488</para>
6489</refsect1>
6490</refentry>
6491
6492<refentry id="API-rio-disc-mport">
6493<refentryinfo>
6494 <title>LINUX</title>
6495 <productname>Kernel Hackers Manual</productname>
6496 <date>July 2017</date>
6497</refentryinfo>
6498<refmeta>
6499 <refentrytitle><phrase>rio_disc_mport</phrase></refentrytitle>
6500 <manvolnum>9</manvolnum>
6501 <refmiscinfo class="version">4.1.27</refmiscinfo>
6502</refmeta>
6503<refnamediv>
6504 <refname>rio_disc_mport</refname>
6505 <refpurpose>
6506     Start discovery through a master port
6507 </refpurpose>
6508</refnamediv>
6509<refsynopsisdiv>
6510 <title>Synopsis</title>
6511  <funcsynopsis><funcprototype>
6512   <funcdef>int <function>rio_disc_mport </function></funcdef>
6513   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
6514   <paramdef>u32 <parameter>flags</parameter></paramdef>
6515  </funcprototype></funcsynopsis>
6516</refsynopsisdiv>
6517<refsect1>
6518 <title>Arguments</title>
6519 <variablelist>
6520  <varlistentry>
6521   <term><parameter>mport</parameter></term>
6522   <listitem>
6523    <para>
6524     Master port to send transactions
6525    </para>
6526   </listitem>
6527  </varlistentry>
6528  <varlistentry>
6529   <term><parameter>flags</parameter></term>
6530   <listitem>
6531    <para>
6532     discovery control flags
6533    </para>
6534   </listitem>
6535  </varlistentry>
6536 </variablelist>
6537</refsect1>
6538<refsect1>
6539<title>Description</title>
6540<para>
6541   Starts the discovery process. If we have an active link,
6542   then wait for the signal that enumeration is complete (if wait
6543   is allowed).
6544   When enumeration completion is signaled, start recursive
6545   peer discovery. Returns <constant>0</constant> if discovery succeeds or <constant>-EBUSY</constant>
6546   on failure.
6547</para>
6548</refsect1>
6549</refentry>
6550
6551<refentry id="API-rio-basic-attach">
6552<refentryinfo>
6553 <title>LINUX</title>
6554 <productname>Kernel Hackers Manual</productname>
6555 <date>July 2017</date>
6556</refentryinfo>
6557<refmeta>
6558 <refentrytitle><phrase>rio_basic_attach</phrase></refentrytitle>
6559 <manvolnum>9</manvolnum>
6560 <refmiscinfo class="version">4.1.27</refmiscinfo>
6561</refmeta>
6562<refnamediv>
6563 <refname>rio_basic_attach</refname>
6564 <refpurpose>
6565   </refpurpose>
6566</refnamediv>
6567<refsynopsisdiv>
6568 <title>Synopsis</title>
6569  <funcsynopsis><funcprototype>
6570   <funcdef>int <function>rio_basic_attach </function></funcdef>
6571   <paramdef> <parameter>void</parameter></paramdef>
6572  </funcprototype></funcsynopsis>
6573</refsynopsisdiv>
6574<refsect1>
6575 <title>Arguments</title>
6576 <variablelist>
6577  <varlistentry>
6578   <term><parameter>void</parameter></term>
6579   <listitem>
6580    <para>
6581     no arguments
6582    </para>
6583   </listitem>
6584  </varlistentry>
6585 </variablelist>
6586</refsect1>
6587<refsect1>
6588<title>Description</title>
6589<para>
6590   </para><para>
6591
6592   When this enumeration/discovery method is loaded as a module this function
6593   registers its specific enumeration and discover routines for all available
6594   RapidIO mport devices. The <quote>scan</quote> command line parameter controls ability of
6595   the module to start RapidIO enumeration/discovery automatically.
6596   </para><para>
6597
6598   Returns 0 for success or -EIO if unable to register itself.
6599   </para><para>
6600
6601   This enumeration/discovery method cannot be unloaded and therefore does not
6602   provide a matching cleanup_module routine.
6603</para>
6604</refsect1>
6605</refentry>
6606
6607     </sect1>
6608     <sect1 id="Driver_functionality"><title>Driver functionality</title>
6609<!-- drivers/rapidio/rio.c -->
6610<refentry id="API-rio-setup-inb-dbell">
6611<refentryinfo>
6612 <title>LINUX</title>
6613 <productname>Kernel Hackers Manual</productname>
6614 <date>July 2017</date>
6615</refentryinfo>
6616<refmeta>
6617 <refentrytitle><phrase>rio_setup_inb_dbell</phrase></refentrytitle>
6618 <manvolnum>9</manvolnum>
6619 <refmiscinfo class="version">4.1.27</refmiscinfo>
6620</refmeta>
6621<refnamediv>
6622 <refname>rio_setup_inb_dbell</refname>
6623 <refpurpose>
6624  bind inbound doorbell callback
6625 </refpurpose>
6626</refnamediv>
6627<refsynopsisdiv>
6628 <title>Synopsis</title>
6629  <funcsynopsis><funcprototype>
6630   <funcdef>int <function>rio_setup_inb_dbell </function></funcdef>
6631   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
6632   <paramdef>void * <parameter>dev_id</parameter></paramdef>
6633   <paramdef>struct resource * <parameter>res</parameter></paramdef>
6634   <paramdef>void (*<parameter>dinb</parameter>)
6635     <funcparams>struct rio_mport * mport, void *dev_id, u16 src, u16 dst, 				  u16 info</funcparams></paramdef>
6636  </funcprototype></funcsynopsis>
6637</refsynopsisdiv>
6638<refsect1>
6639 <title>Arguments</title>
6640 <variablelist>
6641  <varlistentry>
6642   <term><parameter>mport</parameter></term>
6643   <listitem>
6644    <para>
6645     RIO master port to bind the doorbell callback
6646    </para>
6647   </listitem>
6648  </varlistentry>
6649  <varlistentry>
6650   <term><parameter>dev_id</parameter></term>
6651   <listitem>
6652    <para>
6653     Device specific pointer to pass on event
6654    </para>
6655   </listitem>
6656  </varlistentry>
6657  <varlistentry>
6658   <term><parameter>res</parameter></term>
6659   <listitem>
6660    <para>
6661     Doorbell message resource
6662    </para>
6663   </listitem>
6664  </varlistentry>
6665  <varlistentry>
6666   <term><parameter>dinb</parameter></term>
6667   <listitem>
6668    <para>
6669     Callback to execute when doorbell is received
6670    </para>
6671   </listitem>
6672  </varlistentry>
6673 </variablelist>
6674</refsect1>
6675<refsect1>
6676<title>Description</title>
6677<para>
6678   Adds a doorbell resource/callback pair into a port's
6679   doorbell event list. Returns 0 if the request has been
6680   satisfied.
6681</para>
6682</refsect1>
6683</refentry>
6684
6685<refentry id="API-rio-chk-dev-route">
6686<refentryinfo>
6687 <title>LINUX</title>
6688 <productname>Kernel Hackers Manual</productname>
6689 <date>July 2017</date>
6690</refentryinfo>
6691<refmeta>
6692 <refentrytitle><phrase>rio_chk_dev_route</phrase></refentrytitle>
6693 <manvolnum>9</manvolnum>
6694 <refmiscinfo class="version">4.1.27</refmiscinfo>
6695</refmeta>
6696<refnamediv>
6697 <refname>rio_chk_dev_route</refname>
6698 <refpurpose>
6699     Validate route to the specified device.
6700 </refpurpose>
6701</refnamediv>
6702<refsynopsisdiv>
6703 <title>Synopsis</title>
6704  <funcsynopsis><funcprototype>
6705   <funcdef>int <function>rio_chk_dev_route </function></funcdef>
6706   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
6707   <paramdef>struct rio_dev ** <parameter>nrdev</parameter></paramdef>
6708   <paramdef>int * <parameter>npnum</parameter></paramdef>
6709  </funcprototype></funcsynopsis>
6710</refsynopsisdiv>
6711<refsect1>
6712 <title>Arguments</title>
6713 <variablelist>
6714  <varlistentry>
6715   <term><parameter>rdev</parameter></term>
6716   <listitem>
6717    <para>
6718     RIO device failed to respond
6719    </para>
6720   </listitem>
6721  </varlistentry>
6722  <varlistentry>
6723   <term><parameter>nrdev</parameter></term>
6724   <listitem>
6725    <para>
6726     Last active device on the route to rdev
6727    </para>
6728   </listitem>
6729  </varlistentry>
6730  <varlistentry>
6731   <term><parameter>npnum</parameter></term>
6732   <listitem>
6733    <para>
6734     nrdev's port number on the route to rdev
6735    </para>
6736   </listitem>
6737  </varlistentry>
6738 </variablelist>
6739</refsect1>
6740<refsect1>
6741<title>Description</title>
6742<para>
6743   Follows a route to the specified RIO device to determine the last available
6744   device (and corresponding RIO port) on the route.
6745</para>
6746</refsect1>
6747</refentry>
6748
6749<refentry id="API-rio-chk-dev-access">
6750<refentryinfo>
6751 <title>LINUX</title>
6752 <productname>Kernel Hackers Manual</productname>
6753 <date>July 2017</date>
6754</refentryinfo>
6755<refmeta>
6756 <refentrytitle><phrase>rio_chk_dev_access</phrase></refentrytitle>
6757 <manvolnum>9</manvolnum>
6758 <refmiscinfo class="version">4.1.27</refmiscinfo>
6759</refmeta>
6760<refnamediv>
6761 <refname>rio_chk_dev_access</refname>
6762 <refpurpose>
6763     Validate access to the specified device.
6764 </refpurpose>
6765</refnamediv>
6766<refsynopsisdiv>
6767 <title>Synopsis</title>
6768  <funcsynopsis><funcprototype>
6769   <funcdef>int <function>rio_chk_dev_access </function></funcdef>
6770   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
6771  </funcprototype></funcsynopsis>
6772</refsynopsisdiv>
6773<refsect1>
6774 <title>Arguments</title>
6775 <variablelist>
6776  <varlistentry>
6777   <term><parameter>rdev</parameter></term>
6778   <listitem>
6779    <para>
6780     Pointer to RIO device control structure
6781    </para>
6782   </listitem>
6783  </varlistentry>
6784 </variablelist>
6785</refsect1>
6786</refentry>
6787
6788<refentry id="API-rio-get-input-status">
6789<refentryinfo>
6790 <title>LINUX</title>
6791 <productname>Kernel Hackers Manual</productname>
6792 <date>July 2017</date>
6793</refentryinfo>
6794<refmeta>
6795 <refentrytitle><phrase>rio_get_input_status</phrase></refentrytitle>
6796 <manvolnum>9</manvolnum>
6797 <refmiscinfo class="version">4.1.27</refmiscinfo>
6798</refmeta>
6799<refnamediv>
6800 <refname>rio_get_input_status</refname>
6801 <refpurpose>
6802     Sends a Link-Request/Input-Status control symbol and returns link-response (if requested).
6803 </refpurpose>
6804</refnamediv>
6805<refsynopsisdiv>
6806 <title>Synopsis</title>
6807  <funcsynopsis><funcprototype>
6808   <funcdef>int <function>rio_get_input_status </function></funcdef>
6809   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
6810   <paramdef>int <parameter>pnum</parameter></paramdef>
6811   <paramdef>u32 * <parameter>lnkresp</parameter></paramdef>
6812  </funcprototype></funcsynopsis>
6813</refsynopsisdiv>
6814<refsect1>
6815 <title>Arguments</title>
6816 <variablelist>
6817  <varlistentry>
6818   <term><parameter>rdev</parameter></term>
6819   <listitem>
6820    <para>
6821     RIO devive to issue Input-status command
6822    </para>
6823   </listitem>
6824  </varlistentry>
6825  <varlistentry>
6826   <term><parameter>pnum</parameter></term>
6827   <listitem>
6828    <para>
6829     Device port number to issue the command
6830    </para>
6831   </listitem>
6832  </varlistentry>
6833  <varlistentry>
6834   <term><parameter>lnkresp</parameter></term>
6835   <listitem>
6836    <para>
6837     Response from a link partner
6838    </para>
6839   </listitem>
6840  </varlistentry>
6841 </variablelist>
6842</refsect1>
6843</refentry>
6844
6845<refentry id="API-rio-clr-err-stopped">
6846<refentryinfo>
6847 <title>LINUX</title>
6848 <productname>Kernel Hackers Manual</productname>
6849 <date>July 2017</date>
6850</refentryinfo>
6851<refmeta>
6852 <refentrytitle><phrase>rio_clr_err_stopped</phrase></refentrytitle>
6853 <manvolnum>9</manvolnum>
6854 <refmiscinfo class="version">4.1.27</refmiscinfo>
6855</refmeta>
6856<refnamediv>
6857 <refname>rio_clr_err_stopped</refname>
6858 <refpurpose>
6859     Clears port Error-stopped states.
6860 </refpurpose>
6861</refnamediv>
6862<refsynopsisdiv>
6863 <title>Synopsis</title>
6864  <funcsynopsis><funcprototype>
6865   <funcdef>int <function>rio_clr_err_stopped </function></funcdef>
6866   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
6867   <paramdef>u32 <parameter>pnum</parameter></paramdef>
6868   <paramdef>u32 <parameter>err_status</parameter></paramdef>
6869  </funcprototype></funcsynopsis>
6870</refsynopsisdiv>
6871<refsect1>
6872 <title>Arguments</title>
6873 <variablelist>
6874  <varlistentry>
6875   <term><parameter>rdev</parameter></term>
6876   <listitem>
6877    <para>
6878     Pointer to RIO device control structure
6879    </para>
6880   </listitem>
6881  </varlistentry>
6882  <varlistentry>
6883   <term><parameter>pnum</parameter></term>
6884   <listitem>
6885    <para>
6886     Switch port number to clear errors
6887    </para>
6888   </listitem>
6889  </varlistentry>
6890  <varlistentry>
6891   <term><parameter>err_status</parameter></term>
6892   <listitem>
6893    <para>
6894     port error status (if 0 reads register from device)
6895    </para>
6896   </listitem>
6897  </varlistentry>
6898 </variablelist>
6899</refsect1>
6900</refentry>
6901
6902<refentry id="API-rio-std-route-add-entry">
6903<refentryinfo>
6904 <title>LINUX</title>
6905 <productname>Kernel Hackers Manual</productname>
6906 <date>July 2017</date>
6907</refentryinfo>
6908<refmeta>
6909 <refentrytitle><phrase>rio_std_route_add_entry</phrase></refentrytitle>
6910 <manvolnum>9</manvolnum>
6911 <refmiscinfo class="version">4.1.27</refmiscinfo>
6912</refmeta>
6913<refnamediv>
6914 <refname>rio_std_route_add_entry</refname>
6915 <refpurpose>
6916     Add switch route table entry using standard registers defined in RIO specification rev.1.3
6917 </refpurpose>
6918</refnamediv>
6919<refsynopsisdiv>
6920 <title>Synopsis</title>
6921  <funcsynopsis><funcprototype>
6922   <funcdef>int <function>rio_std_route_add_entry </function></funcdef>
6923   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
6924   <paramdef>u16 <parameter>destid</parameter></paramdef>
6925   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
6926   <paramdef>u16 <parameter>table</parameter></paramdef>
6927   <paramdef>u16 <parameter>route_destid</parameter></paramdef>
6928   <paramdef>u8 <parameter>route_port</parameter></paramdef>
6929  </funcprototype></funcsynopsis>
6930</refsynopsisdiv>
6931<refsect1>
6932 <title>Arguments</title>
6933 <variablelist>
6934  <varlistentry>
6935   <term><parameter>mport</parameter></term>
6936   <listitem>
6937    <para>
6938     Master port to issue transaction
6939    </para>
6940   </listitem>
6941  </varlistentry>
6942  <varlistentry>
6943   <term><parameter>destid</parameter></term>
6944   <listitem>
6945    <para>
6946     Destination ID of the device
6947    </para>
6948   </listitem>
6949  </varlistentry>
6950  <varlistentry>
6951   <term><parameter>hopcount</parameter></term>
6952   <listitem>
6953    <para>
6954     Number of switch hops to the device
6955    </para>
6956   </listitem>
6957  </varlistentry>
6958  <varlistentry>
6959   <term><parameter>table</parameter></term>
6960   <listitem>
6961    <para>
6962     routing table ID (global or port-specific)
6963    </para>
6964   </listitem>
6965  </varlistentry>
6966  <varlistentry>
6967   <term><parameter>route_destid</parameter></term>
6968   <listitem>
6969    <para>
6970     destID entry in the RT
6971    </para>
6972   </listitem>
6973  </varlistentry>
6974  <varlistentry>
6975   <term><parameter>route_port</parameter></term>
6976   <listitem>
6977    <para>
6978     destination port for specified destID
6979    </para>
6980   </listitem>
6981  </varlistentry>
6982 </variablelist>
6983</refsect1>
6984</refentry>
6985
6986<refentry id="API-rio-std-route-get-entry">
6987<refentryinfo>
6988 <title>LINUX</title>
6989 <productname>Kernel Hackers Manual</productname>
6990 <date>July 2017</date>
6991</refentryinfo>
6992<refmeta>
6993 <refentrytitle><phrase>rio_std_route_get_entry</phrase></refentrytitle>
6994 <manvolnum>9</manvolnum>
6995 <refmiscinfo class="version">4.1.27</refmiscinfo>
6996</refmeta>
6997<refnamediv>
6998 <refname>rio_std_route_get_entry</refname>
6999 <refpurpose>
7000     Read switch route table entry (port number) associated with specified destID using standard registers defined in RIO specification rev.1.3
7001 </refpurpose>
7002</refnamediv>
7003<refsynopsisdiv>
7004 <title>Synopsis</title>
7005  <funcsynopsis><funcprototype>
7006   <funcdef>int <function>rio_std_route_get_entry </function></funcdef>
7007   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
7008   <paramdef>u16 <parameter>destid</parameter></paramdef>
7009   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
7010   <paramdef>u16 <parameter>table</parameter></paramdef>
7011   <paramdef>u16 <parameter>route_destid</parameter></paramdef>
7012   <paramdef>u8 * <parameter>route_port</parameter></paramdef>
7013  </funcprototype></funcsynopsis>
7014</refsynopsisdiv>
7015<refsect1>
7016 <title>Arguments</title>
7017 <variablelist>
7018  <varlistentry>
7019   <term><parameter>mport</parameter></term>
7020   <listitem>
7021    <para>
7022     Master port to issue transaction
7023    </para>
7024   </listitem>
7025  </varlistentry>
7026  <varlistentry>
7027   <term><parameter>destid</parameter></term>
7028   <listitem>
7029    <para>
7030     Destination ID of the device
7031    </para>
7032   </listitem>
7033  </varlistentry>
7034  <varlistentry>
7035   <term><parameter>hopcount</parameter></term>
7036   <listitem>
7037    <para>
7038     Number of switch hops to the device
7039    </para>
7040   </listitem>
7041  </varlistentry>
7042  <varlistentry>
7043   <term><parameter>table</parameter></term>
7044   <listitem>
7045    <para>
7046     routing table ID (global or port-specific)
7047    </para>
7048   </listitem>
7049  </varlistentry>
7050  <varlistentry>
7051   <term><parameter>route_destid</parameter></term>
7052   <listitem>
7053    <para>
7054     destID entry in the RT
7055    </para>
7056   </listitem>
7057  </varlistentry>
7058  <varlistentry>
7059   <term><parameter>route_port</parameter></term>
7060   <listitem>
7061    <para>
7062     returned destination port for specified destID
7063    </para>
7064   </listitem>
7065  </varlistentry>
7066 </variablelist>
7067</refsect1>
7068</refentry>
7069
7070<refentry id="API-rio-std-route-clr-table">
7071<refentryinfo>
7072 <title>LINUX</title>
7073 <productname>Kernel Hackers Manual</productname>
7074 <date>July 2017</date>
7075</refentryinfo>
7076<refmeta>
7077 <refentrytitle><phrase>rio_std_route_clr_table</phrase></refentrytitle>
7078 <manvolnum>9</manvolnum>
7079 <refmiscinfo class="version">4.1.27</refmiscinfo>
7080</refmeta>
7081<refnamediv>
7082 <refname>rio_std_route_clr_table</refname>
7083 <refpurpose>
7084     Clear swotch route table using standard registers defined in RIO specification rev.1.3.
7085 </refpurpose>
7086</refnamediv>
7087<refsynopsisdiv>
7088 <title>Synopsis</title>
7089  <funcsynopsis><funcprototype>
7090   <funcdef>int <function>rio_std_route_clr_table </function></funcdef>
7091   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
7092   <paramdef>u16 <parameter>destid</parameter></paramdef>
7093   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
7094   <paramdef>u16 <parameter>table</parameter></paramdef>
7095  </funcprototype></funcsynopsis>
7096</refsynopsisdiv>
7097<refsect1>
7098 <title>Arguments</title>
7099 <variablelist>
7100  <varlistentry>
7101   <term><parameter>mport</parameter></term>
7102   <listitem>
7103    <para>
7104     Master port to issue transaction
7105    </para>
7106   </listitem>
7107  </varlistentry>
7108  <varlistentry>
7109   <term><parameter>destid</parameter></term>
7110   <listitem>
7111    <para>
7112     Destination ID of the device
7113    </para>
7114   </listitem>
7115  </varlistentry>
7116  <varlistentry>
7117   <term><parameter>hopcount</parameter></term>
7118   <listitem>
7119    <para>
7120     Number of switch hops to the device
7121    </para>
7122   </listitem>
7123  </varlistentry>
7124  <varlistentry>
7125   <term><parameter>table</parameter></term>
7126   <listitem>
7127    <para>
7128     routing table ID (global or port-specific)
7129    </para>
7130   </listitem>
7131  </varlistentry>
7132 </variablelist>
7133</refsect1>
7134</refentry>
7135
7136<refentry id="API-rio-find-mport">
7137<refentryinfo>
7138 <title>LINUX</title>
7139 <productname>Kernel Hackers Manual</productname>
7140 <date>July 2017</date>
7141</refentryinfo>
7142<refmeta>
7143 <refentrytitle><phrase>rio_find_mport</phrase></refentrytitle>
7144 <manvolnum>9</manvolnum>
7145 <refmiscinfo class="version">4.1.27</refmiscinfo>
7146</refmeta>
7147<refnamediv>
7148 <refname>rio_find_mport</refname>
7149 <refpurpose>
7150     find RIO mport by its ID
7151 </refpurpose>
7152</refnamediv>
7153<refsynopsisdiv>
7154 <title>Synopsis</title>
7155  <funcsynopsis><funcprototype>
7156   <funcdef>struct rio_mport * <function>rio_find_mport </function></funcdef>
7157   <paramdef>int <parameter>mport_id</parameter></paramdef>
7158  </funcprototype></funcsynopsis>
7159</refsynopsisdiv>
7160<refsect1>
7161 <title>Arguments</title>
7162 <variablelist>
7163  <varlistentry>
7164   <term><parameter>mport_id</parameter></term>
7165   <listitem>
7166    <para>
7167     number (ID) of mport device
7168    </para>
7169   </listitem>
7170  </varlistentry>
7171 </variablelist>
7172</refsect1>
7173<refsect1>
7174<title>Description</title>
7175<para>
7176   Given a RIO mport number, the desired mport is located
7177   in the global list of mports. If the mport is found, a pointer to its
7178   data structure is returned.  If no mport is found, <constant>NULL</constant> is returned.
7179</para>
7180</refsect1>
7181</refentry>
7182
7183<refentry id="API-rio-mport-scan">
7184<refentryinfo>
7185 <title>LINUX</title>
7186 <productname>Kernel Hackers Manual</productname>
7187 <date>July 2017</date>
7188</refentryinfo>
7189<refmeta>
7190 <refentrytitle><phrase>rio_mport_scan</phrase></refentrytitle>
7191 <manvolnum>9</manvolnum>
7192 <refmiscinfo class="version">4.1.27</refmiscinfo>
7193</refmeta>
7194<refnamediv>
7195 <refname>rio_mport_scan</refname>
7196 <refpurpose>
7197     execute enumeration/discovery on the specified mport
7198 </refpurpose>
7199</refnamediv>
7200<refsynopsisdiv>
7201 <title>Synopsis</title>
7202  <funcsynopsis><funcprototype>
7203   <funcdef>int <function>rio_mport_scan </function></funcdef>
7204   <paramdef>int <parameter>mport_id</parameter></paramdef>
7205  </funcprototype></funcsynopsis>
7206</refsynopsisdiv>
7207<refsect1>
7208 <title>Arguments</title>
7209 <variablelist>
7210  <varlistentry>
7211   <term><parameter>mport_id</parameter></term>
7212   <listitem>
7213    <para>
7214     number (ID) of mport device
7215    </para>
7216   </listitem>
7217  </varlistentry>
7218 </variablelist>
7219</refsect1>
7220</refentry>
7221
7222<!-- drivers/rapidio/rio-access.c -->
7223<refentry id="API-RIO-LOP-READ">
7224<refentryinfo>
7225 <title>LINUX</title>
7226 <productname>Kernel Hackers Manual</productname>
7227 <date>July 2017</date>
7228</refentryinfo>
7229<refmeta>
7230 <refentrytitle><phrase>RIO_LOP_READ</phrase></refentrytitle>
7231 <manvolnum>9</manvolnum>
7232 <refmiscinfo class="version">4.1.27</refmiscinfo>
7233</refmeta>
7234<refnamediv>
7235 <refname>RIO_LOP_READ</refname>
7236 <refpurpose>
7237  Generate rio_local_read_config_* functions
7238 </refpurpose>
7239</refnamediv>
7240<refsynopsisdiv>
7241 <title>Synopsis</title>
7242  <funcsynopsis><funcprototype>
7243   <funcdef> <function>RIO_LOP_READ </function></funcdef>
7244   <paramdef> <parameter>size</parameter></paramdef>
7245   <paramdef> <parameter>type</parameter></paramdef>
7246   <paramdef> <parameter>len</parameter></paramdef>
7247  </funcprototype></funcsynopsis>
7248</refsynopsisdiv>
7249<refsect1>
7250 <title>Arguments</title>
7251 <variablelist>
7252  <varlistentry>
7253   <term><parameter>size</parameter></term>
7254   <listitem>
7255    <para>
7256     Size of configuration space read (8, 16, 32 bits)
7257    </para>
7258   </listitem>
7259  </varlistentry>
7260  <varlistentry>
7261   <term><parameter>type</parameter></term>
7262   <listitem>
7263    <para>
7264     C type of value argument
7265    </para>
7266   </listitem>
7267  </varlistentry>
7268  <varlistentry>
7269   <term><parameter>len</parameter></term>
7270   <listitem>
7271    <para>
7272     Length of configuration space read (1, 2, 4 bytes)
7273    </para>
7274   </listitem>
7275  </varlistentry>
7276 </variablelist>
7277</refsect1>
7278<refsect1>
7279<title>Description</title>
7280<para>
7281   Generates rio_local_read_config_* functions used to access
7282   configuration space registers on the local device.
7283</para>
7284</refsect1>
7285</refentry>
7286
7287<refentry id="API-RIO-LOP-WRITE">
7288<refentryinfo>
7289 <title>LINUX</title>
7290 <productname>Kernel Hackers Manual</productname>
7291 <date>July 2017</date>
7292</refentryinfo>
7293<refmeta>
7294 <refentrytitle><phrase>RIO_LOP_WRITE</phrase></refentrytitle>
7295 <manvolnum>9</manvolnum>
7296 <refmiscinfo class="version">4.1.27</refmiscinfo>
7297</refmeta>
7298<refnamediv>
7299 <refname>RIO_LOP_WRITE</refname>
7300 <refpurpose>
7301     Generate rio_local_write_config_* functions
7302 </refpurpose>
7303</refnamediv>
7304<refsynopsisdiv>
7305 <title>Synopsis</title>
7306  <funcsynopsis><funcprototype>
7307   <funcdef> <function>RIO_LOP_WRITE </function></funcdef>
7308   <paramdef> <parameter>size</parameter></paramdef>
7309   <paramdef> <parameter>type</parameter></paramdef>
7310   <paramdef> <parameter>len</parameter></paramdef>
7311  </funcprototype></funcsynopsis>
7312</refsynopsisdiv>
7313<refsect1>
7314 <title>Arguments</title>
7315 <variablelist>
7316  <varlistentry>
7317   <term><parameter>size</parameter></term>
7318   <listitem>
7319    <para>
7320     Size of configuration space write (8, 16, 32 bits)
7321    </para>
7322   </listitem>
7323  </varlistentry>
7324  <varlistentry>
7325   <term><parameter>type</parameter></term>
7326   <listitem>
7327    <para>
7328     C type of value argument
7329    </para>
7330   </listitem>
7331  </varlistentry>
7332  <varlistentry>
7333   <term><parameter>len</parameter></term>
7334   <listitem>
7335    <para>
7336     Length of configuration space write (1, 2, 4 bytes)
7337    </para>
7338   </listitem>
7339  </varlistentry>
7340 </variablelist>
7341</refsect1>
7342<refsect1>
7343<title>Description</title>
7344<para>
7345   Generates rio_local_write_config_* functions used to access
7346   configuration space registers on the local device.
7347</para>
7348</refsect1>
7349</refentry>
7350
7351<refentry id="API-RIO-OP-READ">
7352<refentryinfo>
7353 <title>LINUX</title>
7354 <productname>Kernel Hackers Manual</productname>
7355 <date>July 2017</date>
7356</refentryinfo>
7357<refmeta>
7358 <refentrytitle><phrase>RIO_OP_READ</phrase></refentrytitle>
7359 <manvolnum>9</manvolnum>
7360 <refmiscinfo class="version">4.1.27</refmiscinfo>
7361</refmeta>
7362<refnamediv>
7363 <refname>RIO_OP_READ</refname>
7364 <refpurpose>
7365     Generate rio_mport_read_config_* functions
7366 </refpurpose>
7367</refnamediv>
7368<refsynopsisdiv>
7369 <title>Synopsis</title>
7370  <funcsynopsis><funcprototype>
7371   <funcdef> <function>RIO_OP_READ </function></funcdef>
7372   <paramdef> <parameter>size</parameter></paramdef>
7373   <paramdef> <parameter>type</parameter></paramdef>
7374   <paramdef> <parameter>len</parameter></paramdef>
7375  </funcprototype></funcsynopsis>
7376</refsynopsisdiv>
7377<refsect1>
7378 <title>Arguments</title>
7379 <variablelist>
7380  <varlistentry>
7381   <term><parameter>size</parameter></term>
7382   <listitem>
7383    <para>
7384     Size of configuration space read (8, 16, 32 bits)
7385    </para>
7386   </listitem>
7387  </varlistentry>
7388  <varlistentry>
7389   <term><parameter>type</parameter></term>
7390   <listitem>
7391    <para>
7392     C type of value argument
7393    </para>
7394   </listitem>
7395  </varlistentry>
7396  <varlistentry>
7397   <term><parameter>len</parameter></term>
7398   <listitem>
7399    <para>
7400     Length of configuration space read (1, 2, 4 bytes)
7401    </para>
7402   </listitem>
7403  </varlistentry>
7404 </variablelist>
7405</refsect1>
7406<refsect1>
7407<title>Description</title>
7408<para>
7409   Generates rio_mport_read_config_* functions used to access
7410   configuration space registers on the local device.
7411</para>
7412</refsect1>
7413</refentry>
7414
7415<refentry id="API-RIO-OP-WRITE">
7416<refentryinfo>
7417 <title>LINUX</title>
7418 <productname>Kernel Hackers Manual</productname>
7419 <date>July 2017</date>
7420</refentryinfo>
7421<refmeta>
7422 <refentrytitle><phrase>RIO_OP_WRITE</phrase></refentrytitle>
7423 <manvolnum>9</manvolnum>
7424 <refmiscinfo class="version">4.1.27</refmiscinfo>
7425</refmeta>
7426<refnamediv>
7427 <refname>RIO_OP_WRITE</refname>
7428 <refpurpose>
7429     Generate rio_mport_write_config_* functions
7430 </refpurpose>
7431</refnamediv>
7432<refsynopsisdiv>
7433 <title>Synopsis</title>
7434  <funcsynopsis><funcprototype>
7435   <funcdef> <function>RIO_OP_WRITE </function></funcdef>
7436   <paramdef> <parameter>size</parameter></paramdef>
7437   <paramdef> <parameter>type</parameter></paramdef>
7438   <paramdef> <parameter>len</parameter></paramdef>
7439  </funcprototype></funcsynopsis>
7440</refsynopsisdiv>
7441<refsect1>
7442 <title>Arguments</title>
7443 <variablelist>
7444  <varlistentry>
7445   <term><parameter>size</parameter></term>
7446   <listitem>
7447    <para>
7448     Size of configuration space write (8, 16, 32 bits)
7449    </para>
7450   </listitem>
7451  </varlistentry>
7452  <varlistentry>
7453   <term><parameter>type</parameter></term>
7454   <listitem>
7455    <para>
7456     C type of value argument
7457    </para>
7458   </listitem>
7459  </varlistentry>
7460  <varlistentry>
7461   <term><parameter>len</parameter></term>
7462   <listitem>
7463    <para>
7464     Length of configuration space write (1, 2, 4 bytes)
7465    </para>
7466   </listitem>
7467  </varlistentry>
7468 </variablelist>
7469</refsect1>
7470<refsect1>
7471<title>Description</title>
7472<para>
7473   Generates rio_mport_write_config_* functions used to access
7474   configuration space registers on the local device.
7475</para>
7476</refsect1>
7477</refentry>
7478
7479     </sect1>
7480     <sect1 id="Device_model_support"><title>Device model support</title>
7481<!-- drivers/rapidio/rio-driver.c -->
7482<refentry id="API-rio-match-device">
7483<refentryinfo>
7484 <title>LINUX</title>
7485 <productname>Kernel Hackers Manual</productname>
7486 <date>July 2017</date>
7487</refentryinfo>
7488<refmeta>
7489 <refentrytitle><phrase>rio_match_device</phrase></refentrytitle>
7490 <manvolnum>9</manvolnum>
7491 <refmiscinfo class="version">4.1.27</refmiscinfo>
7492</refmeta>
7493<refnamediv>
7494 <refname>rio_match_device</refname>
7495 <refpurpose>
7496  Tell if a RIO device has a matching RIO device id structure
7497 </refpurpose>
7498</refnamediv>
7499<refsynopsisdiv>
7500 <title>Synopsis</title>
7501  <funcsynopsis><funcprototype>
7502   <funcdef>const struct rio_device_id * <function>rio_match_device </function></funcdef>
7503   <paramdef>const struct rio_device_id * <parameter>id</parameter></paramdef>
7504   <paramdef>const struct rio_dev * <parameter>rdev</parameter></paramdef>
7505  </funcprototype></funcsynopsis>
7506</refsynopsisdiv>
7507<refsect1>
7508 <title>Arguments</title>
7509 <variablelist>
7510  <varlistentry>
7511   <term><parameter>id</parameter></term>
7512   <listitem>
7513    <para>
7514     the RIO device id structure to match against
7515    </para>
7516   </listitem>
7517  </varlistentry>
7518  <varlistentry>
7519   <term><parameter>rdev</parameter></term>
7520   <listitem>
7521    <para>
7522     the RIO device structure to match against
7523    </para>
7524   </listitem>
7525  </varlistentry>
7526 </variablelist>
7527</refsect1>
7528<refsect1>
7529<title>Description</title>
7530<para>
7531   Used from driver probe and bus matching to check whether a RIO device
7532   matches a device id structure provided by a RIO driver. Returns the
7533   matching <structname>struct rio_device_id</structname> or <constant>NULL</constant> if there is no match.
7534</para>
7535</refsect1>
7536</refentry>
7537
7538<refentry id="API-rio-device-probe">
7539<refentryinfo>
7540 <title>LINUX</title>
7541 <productname>Kernel Hackers Manual</productname>
7542 <date>July 2017</date>
7543</refentryinfo>
7544<refmeta>
7545 <refentrytitle><phrase>rio_device_probe</phrase></refentrytitle>
7546 <manvolnum>9</manvolnum>
7547 <refmiscinfo class="version">4.1.27</refmiscinfo>
7548</refmeta>
7549<refnamediv>
7550 <refname>rio_device_probe</refname>
7551 <refpurpose>
7552     Tell if a RIO device structure has a matching RIO device id structure
7553 </refpurpose>
7554</refnamediv>
7555<refsynopsisdiv>
7556 <title>Synopsis</title>
7557  <funcsynopsis><funcprototype>
7558   <funcdef>int <function>rio_device_probe </function></funcdef>
7559   <paramdef>struct device * <parameter>dev</parameter></paramdef>
7560  </funcprototype></funcsynopsis>
7561</refsynopsisdiv>
7562<refsect1>
7563 <title>Arguments</title>
7564 <variablelist>
7565  <varlistentry>
7566   <term><parameter>dev</parameter></term>
7567   <listitem>
7568    <para>
7569     the RIO device structure to match against
7570    </para>
7571   </listitem>
7572  </varlistentry>
7573 </variablelist>
7574</refsect1>
7575<refsect1>
7576<title>Description</title>
7577<para>
7578   return 0 and set rio_dev-&gt;driver when drv claims rio_dev, else error
7579</para>
7580</refsect1>
7581</refentry>
7582
7583<refentry id="API-rio-device-remove">
7584<refentryinfo>
7585 <title>LINUX</title>
7586 <productname>Kernel Hackers Manual</productname>
7587 <date>July 2017</date>
7588</refentryinfo>
7589<refmeta>
7590 <refentrytitle><phrase>rio_device_remove</phrase></refentrytitle>
7591 <manvolnum>9</manvolnum>
7592 <refmiscinfo class="version">4.1.27</refmiscinfo>
7593</refmeta>
7594<refnamediv>
7595 <refname>rio_device_remove</refname>
7596 <refpurpose>
7597     Remove a RIO device from the system
7598 </refpurpose>
7599</refnamediv>
7600<refsynopsisdiv>
7601 <title>Synopsis</title>
7602  <funcsynopsis><funcprototype>
7603   <funcdef>int <function>rio_device_remove </function></funcdef>
7604   <paramdef>struct device * <parameter>dev</parameter></paramdef>
7605  </funcprototype></funcsynopsis>
7606</refsynopsisdiv>
7607<refsect1>
7608 <title>Arguments</title>
7609 <variablelist>
7610  <varlistentry>
7611   <term><parameter>dev</parameter></term>
7612   <listitem>
7613    <para>
7614     the RIO device structure to match against
7615    </para>
7616   </listitem>
7617  </varlistentry>
7618 </variablelist>
7619</refsect1>
7620<refsect1>
7621<title>Description</title>
7622<para>
7623   Remove a RIO device from the system. If it has an associated
7624   driver, then run the driver <function>remove</function> method.  Then update
7625   the reference count.
7626</para>
7627</refsect1>
7628</refentry>
7629
7630<refentry id="API-rio-match-bus">
7631<refentryinfo>
7632 <title>LINUX</title>
7633 <productname>Kernel Hackers Manual</productname>
7634 <date>July 2017</date>
7635</refentryinfo>
7636<refmeta>
7637 <refentrytitle><phrase>rio_match_bus</phrase></refentrytitle>
7638 <manvolnum>9</manvolnum>
7639 <refmiscinfo class="version">4.1.27</refmiscinfo>
7640</refmeta>
7641<refnamediv>
7642 <refname>rio_match_bus</refname>
7643 <refpurpose>
7644     Tell if a RIO device structure has a matching RIO driver device id structure
7645 </refpurpose>
7646</refnamediv>
7647<refsynopsisdiv>
7648 <title>Synopsis</title>
7649  <funcsynopsis><funcprototype>
7650   <funcdef>int <function>rio_match_bus </function></funcdef>
7651   <paramdef>struct device * <parameter>dev</parameter></paramdef>
7652   <paramdef>struct device_driver * <parameter>drv</parameter></paramdef>
7653  </funcprototype></funcsynopsis>
7654</refsynopsisdiv>
7655<refsect1>
7656 <title>Arguments</title>
7657 <variablelist>
7658  <varlistentry>
7659   <term><parameter>dev</parameter></term>
7660   <listitem>
7661    <para>
7662     the standard device structure to match against
7663    </para>
7664   </listitem>
7665  </varlistentry>
7666  <varlistentry>
7667   <term><parameter>drv</parameter></term>
7668   <listitem>
7669    <para>
7670     the standard driver structure containing the ids to match against
7671    </para>
7672   </listitem>
7673  </varlistentry>
7674 </variablelist>
7675</refsect1>
7676<refsect1>
7677<title>Description</title>
7678<para>
7679   Used by a driver to check whether a RIO device present in the
7680   system is in its list of supported devices. Returns 1 if
7681   there is a matching <structname>struct rio_device_id</structname> or 0 if there is
7682   no match.
7683</para>
7684</refsect1>
7685</refentry>
7686
7687<refentry id="API-rio-bus-init">
7688<refentryinfo>
7689 <title>LINUX</title>
7690 <productname>Kernel Hackers Manual</productname>
7691 <date>July 2017</date>
7692</refentryinfo>
7693<refmeta>
7694 <refentrytitle><phrase>rio_bus_init</phrase></refentrytitle>
7695 <manvolnum>9</manvolnum>
7696 <refmiscinfo class="version">4.1.27</refmiscinfo>
7697</refmeta>
7698<refnamediv>
7699 <refname>rio_bus_init</refname>
7700 <refpurpose>
7701     Register the RapidIO bus with the device model
7702 </refpurpose>
7703</refnamediv>
7704<refsynopsisdiv>
7705 <title>Synopsis</title>
7706  <funcsynopsis><funcprototype>
7707   <funcdef>int <function>rio_bus_init </function></funcdef>
7708   <paramdef> <parameter>void</parameter></paramdef>
7709  </funcprototype></funcsynopsis>
7710</refsynopsisdiv>
7711<refsect1>
7712 <title>Arguments</title>
7713 <variablelist>
7714  <varlistentry>
7715   <term><parameter>void</parameter></term>
7716   <listitem>
7717    <para>
7718     no arguments
7719    </para>
7720   </listitem>
7721  </varlistentry>
7722 </variablelist>
7723</refsect1>
7724<refsect1>
7725<title>Description</title>
7726<para>
7727   </para><para>
7728
7729   Registers the RIO mport device class and RIO bus type with the Linux
7730   device model.
7731</para>
7732</refsect1>
7733</refentry>
7734
7735     </sect1>
7736     <sect1 id="Sysfs_support"><title>Sysfs support</title>
7737<!-- drivers/rapidio/rio-sysfs.c -->
7738<refentry id="API-rio-create-sysfs-dev-files">
7739<refentryinfo>
7740 <title>LINUX</title>
7741 <productname>Kernel Hackers Manual</productname>
7742 <date>July 2017</date>
7743</refentryinfo>
7744<refmeta>
7745 <refentrytitle><phrase>rio_create_sysfs_dev_files</phrase></refentrytitle>
7746 <manvolnum>9</manvolnum>
7747 <refmiscinfo class="version">4.1.27</refmiscinfo>
7748</refmeta>
7749<refnamediv>
7750 <refname>rio_create_sysfs_dev_files</refname>
7751 <refpurpose>
7752  create RIO specific sysfs files
7753 </refpurpose>
7754</refnamediv>
7755<refsynopsisdiv>
7756 <title>Synopsis</title>
7757  <funcsynopsis><funcprototype>
7758   <funcdef>int <function>rio_create_sysfs_dev_files </function></funcdef>
7759   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
7760  </funcprototype></funcsynopsis>
7761</refsynopsisdiv>
7762<refsect1>
7763 <title>Arguments</title>
7764 <variablelist>
7765  <varlistentry>
7766   <term><parameter>rdev</parameter></term>
7767   <listitem>
7768    <para>
7769     device whose entries should be created
7770    </para>
7771   </listitem>
7772  </varlistentry>
7773 </variablelist>
7774</refsect1>
7775<refsect1>
7776<title>Description</title>
7777<para>
7778   Create files when <parameter>rdev</parameter> is added to sysfs.
7779</para>
7780</refsect1>
7781</refentry>
7782
7783<refentry id="API-rio-remove-sysfs-dev-files">
7784<refentryinfo>
7785 <title>LINUX</title>
7786 <productname>Kernel Hackers Manual</productname>
7787 <date>July 2017</date>
7788</refentryinfo>
7789<refmeta>
7790 <refentrytitle><phrase>rio_remove_sysfs_dev_files</phrase></refentrytitle>
7791 <manvolnum>9</manvolnum>
7792 <refmiscinfo class="version">4.1.27</refmiscinfo>
7793</refmeta>
7794<refnamediv>
7795 <refname>rio_remove_sysfs_dev_files</refname>
7796 <refpurpose>
7797     cleanup RIO specific sysfs files
7798 </refpurpose>
7799</refnamediv>
7800<refsynopsisdiv>
7801 <title>Synopsis</title>
7802  <funcsynopsis><funcprototype>
7803   <funcdef>void <function>rio_remove_sysfs_dev_files </function></funcdef>
7804   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
7805  </funcprototype></funcsynopsis>
7806</refsynopsisdiv>
7807<refsect1>
7808 <title>Arguments</title>
7809 <variablelist>
7810  <varlistentry>
7811   <term><parameter>rdev</parameter></term>
7812   <listitem>
7813    <para>
7814     device whose entries we should free
7815    </para>
7816   </listitem>
7817  </varlistentry>
7818 </variablelist>
7819</refsect1>
7820<refsect1>
7821<title>Description</title>
7822<para>
7823   Cleanup when <parameter>rdev</parameter> is removed from sysfs.
7824</para>
7825</refsect1>
7826</refentry>
7827
7828     </sect1>
7829     <sect1 id="PPC32_support"><title>PPC32 support</title>
7830<!-- arch/powerpc/sysdev/fsl_rio.c -->
7831<refentry id="API-fsl-local-config-read">
7832<refentryinfo>
7833 <title>LINUX</title>
7834 <productname>Kernel Hackers Manual</productname>
7835 <date>July 2017</date>
7836</refentryinfo>
7837<refmeta>
7838 <refentrytitle><phrase>fsl_local_config_read</phrase></refentrytitle>
7839 <manvolnum>9</manvolnum>
7840 <refmiscinfo class="version">4.1.27</refmiscinfo>
7841</refmeta>
7842<refnamediv>
7843 <refname>fsl_local_config_read</refname>
7844 <refpurpose>
7845  Generate a MPC85xx local config space read
7846 </refpurpose>
7847</refnamediv>
7848<refsynopsisdiv>
7849 <title>Synopsis</title>
7850  <funcsynopsis><funcprototype>
7851   <funcdef>int <function>fsl_local_config_read </function></funcdef>
7852   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
7853   <paramdef>int <parameter>index</parameter></paramdef>
7854   <paramdef>u32 <parameter>offset</parameter></paramdef>
7855   <paramdef>int <parameter>len</parameter></paramdef>
7856   <paramdef>u32 * <parameter>data</parameter></paramdef>
7857  </funcprototype></funcsynopsis>
7858</refsynopsisdiv>
7859<refsect1>
7860 <title>Arguments</title>
7861 <variablelist>
7862  <varlistentry>
7863   <term><parameter>mport</parameter></term>
7864   <listitem>
7865    <para>
7866     RapidIO master port info
7867    </para>
7868   </listitem>
7869  </varlistentry>
7870  <varlistentry>
7871   <term><parameter>index</parameter></term>
7872   <listitem>
7873    <para>
7874     ID of RapdiIO interface
7875    </para>
7876   </listitem>
7877  </varlistentry>
7878  <varlistentry>
7879   <term><parameter>offset</parameter></term>
7880   <listitem>
7881    <para>
7882     Offset into configuration space
7883    </para>
7884   </listitem>
7885  </varlistentry>
7886  <varlistentry>
7887   <term><parameter>len</parameter></term>
7888   <listitem>
7889    <para>
7890     Length (in bytes) of the maintenance transaction
7891    </para>
7892   </listitem>
7893  </varlistentry>
7894  <varlistentry>
7895   <term><parameter>data</parameter></term>
7896   <listitem>
7897    <para>
7898     Value to be read into
7899    </para>
7900   </listitem>
7901  </varlistentry>
7902 </variablelist>
7903</refsect1>
7904<refsect1>
7905<title>Description</title>
7906<para>
7907   Generates a MPC85xx local configuration space read. Returns <constant>0</constant> on
7908   success or <constant>-EINVAL</constant> on failure.
7909</para>
7910</refsect1>
7911</refentry>
7912
7913<refentry id="API-fsl-local-config-write">
7914<refentryinfo>
7915 <title>LINUX</title>
7916 <productname>Kernel Hackers Manual</productname>
7917 <date>July 2017</date>
7918</refentryinfo>
7919<refmeta>
7920 <refentrytitle><phrase>fsl_local_config_write</phrase></refentrytitle>
7921 <manvolnum>9</manvolnum>
7922 <refmiscinfo class="version">4.1.27</refmiscinfo>
7923</refmeta>
7924<refnamediv>
7925 <refname>fsl_local_config_write</refname>
7926 <refpurpose>
7927     Generate a MPC85xx local config space write
7928 </refpurpose>
7929</refnamediv>
7930<refsynopsisdiv>
7931 <title>Synopsis</title>
7932  <funcsynopsis><funcprototype>
7933   <funcdef>int <function>fsl_local_config_write </function></funcdef>
7934   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
7935   <paramdef>int <parameter>index</parameter></paramdef>
7936   <paramdef>u32 <parameter>offset</parameter></paramdef>
7937   <paramdef>int <parameter>len</parameter></paramdef>
7938   <paramdef>u32 <parameter>data</parameter></paramdef>
7939  </funcprototype></funcsynopsis>
7940</refsynopsisdiv>
7941<refsect1>
7942 <title>Arguments</title>
7943 <variablelist>
7944  <varlistentry>
7945   <term><parameter>mport</parameter></term>
7946   <listitem>
7947    <para>
7948     RapidIO master port info
7949    </para>
7950   </listitem>
7951  </varlistentry>
7952  <varlistentry>
7953   <term><parameter>index</parameter></term>
7954   <listitem>
7955    <para>
7956     ID of RapdiIO interface
7957    </para>
7958   </listitem>
7959  </varlistentry>
7960  <varlistentry>
7961   <term><parameter>offset</parameter></term>
7962   <listitem>
7963    <para>
7964     Offset into configuration space
7965    </para>
7966   </listitem>
7967  </varlistentry>
7968  <varlistentry>
7969   <term><parameter>len</parameter></term>
7970   <listitem>
7971    <para>
7972     Length (in bytes) of the maintenance transaction
7973    </para>
7974   </listitem>
7975  </varlistentry>
7976  <varlistentry>
7977   <term><parameter>data</parameter></term>
7978   <listitem>
7979    <para>
7980     Value to be written
7981    </para>
7982   </listitem>
7983  </varlistentry>
7984 </variablelist>
7985</refsect1>
7986<refsect1>
7987<title>Description</title>
7988<para>
7989   Generates a MPC85xx local configuration space write. Returns <constant>0</constant> on
7990   success or <constant>-EINVAL</constant> on failure.
7991</para>
7992</refsect1>
7993</refentry>
7994
7995<refentry id="API-fsl-rio-config-read">
7996<refentryinfo>
7997 <title>LINUX</title>
7998 <productname>Kernel Hackers Manual</productname>
7999 <date>July 2017</date>
8000</refentryinfo>
8001<refmeta>
8002 <refentrytitle><phrase>fsl_rio_config_read</phrase></refentrytitle>
8003 <manvolnum>9</manvolnum>
8004 <refmiscinfo class="version">4.1.27</refmiscinfo>
8005</refmeta>
8006<refnamediv>
8007 <refname>fsl_rio_config_read</refname>
8008 <refpurpose>
8009     Generate a MPC85xx read maintenance transaction
8010 </refpurpose>
8011</refnamediv>
8012<refsynopsisdiv>
8013 <title>Synopsis</title>
8014  <funcsynopsis><funcprototype>
8015   <funcdef>int <function>fsl_rio_config_read </function></funcdef>
8016   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
8017   <paramdef>int <parameter>index</parameter></paramdef>
8018   <paramdef>u16 <parameter>destid</parameter></paramdef>
8019   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
8020   <paramdef>u32 <parameter>offset</parameter></paramdef>
8021   <paramdef>int <parameter>len</parameter></paramdef>
8022   <paramdef>u32 * <parameter>val</parameter></paramdef>
8023  </funcprototype></funcsynopsis>
8024</refsynopsisdiv>
8025<refsect1>
8026 <title>Arguments</title>
8027 <variablelist>
8028  <varlistentry>
8029   <term><parameter>mport</parameter></term>
8030   <listitem>
8031    <para>
8032     RapidIO master port info
8033    </para>
8034   </listitem>
8035  </varlistentry>
8036  <varlistentry>
8037   <term><parameter>index</parameter></term>
8038   <listitem>
8039    <para>
8040     ID of RapdiIO interface
8041    </para>
8042   </listitem>
8043  </varlistentry>
8044  <varlistentry>
8045   <term><parameter>destid</parameter></term>
8046   <listitem>
8047    <para>
8048     Destination ID of transaction
8049    </para>
8050   </listitem>
8051  </varlistentry>
8052  <varlistentry>
8053   <term><parameter>hopcount</parameter></term>
8054   <listitem>
8055    <para>
8056     Number of hops to target device
8057    </para>
8058   </listitem>
8059  </varlistentry>
8060  <varlistentry>
8061   <term><parameter>offset</parameter></term>
8062   <listitem>
8063    <para>
8064     Offset into configuration space
8065    </para>
8066   </listitem>
8067  </varlistentry>
8068  <varlistentry>
8069   <term><parameter>len</parameter></term>
8070   <listitem>
8071    <para>
8072     Length (in bytes) of the maintenance transaction
8073    </para>
8074   </listitem>
8075  </varlistentry>
8076  <varlistentry>
8077   <term><parameter>val</parameter></term>
8078   <listitem>
8079    <para>
8080     Location to be read into
8081    </para>
8082   </listitem>
8083  </varlistentry>
8084 </variablelist>
8085</refsect1>
8086<refsect1>
8087<title>Description</title>
8088<para>
8089   Generates a MPC85xx read maintenance transaction. Returns <constant>0</constant> on
8090   success or <constant>-EINVAL</constant> on failure.
8091</para>
8092</refsect1>
8093</refentry>
8094
8095<refentry id="API-fsl-rio-config-write">
8096<refentryinfo>
8097 <title>LINUX</title>
8098 <productname>Kernel Hackers Manual</productname>
8099 <date>July 2017</date>
8100</refentryinfo>
8101<refmeta>
8102 <refentrytitle><phrase>fsl_rio_config_write</phrase></refentrytitle>
8103 <manvolnum>9</manvolnum>
8104 <refmiscinfo class="version">4.1.27</refmiscinfo>
8105</refmeta>
8106<refnamediv>
8107 <refname>fsl_rio_config_write</refname>
8108 <refpurpose>
8109     Generate a MPC85xx write maintenance transaction
8110 </refpurpose>
8111</refnamediv>
8112<refsynopsisdiv>
8113 <title>Synopsis</title>
8114  <funcsynopsis><funcprototype>
8115   <funcdef>int <function>fsl_rio_config_write </function></funcdef>
8116   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
8117   <paramdef>int <parameter>index</parameter></paramdef>
8118   <paramdef>u16 <parameter>destid</parameter></paramdef>
8119   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
8120   <paramdef>u32 <parameter>offset</parameter></paramdef>
8121   <paramdef>int <parameter>len</parameter></paramdef>
8122   <paramdef>u32 <parameter>val</parameter></paramdef>
8123  </funcprototype></funcsynopsis>
8124</refsynopsisdiv>
8125<refsect1>
8126 <title>Arguments</title>
8127 <variablelist>
8128  <varlistentry>
8129   <term><parameter>mport</parameter></term>
8130   <listitem>
8131    <para>
8132     RapidIO master port info
8133    </para>
8134   </listitem>
8135  </varlistentry>
8136  <varlistentry>
8137   <term><parameter>index</parameter></term>
8138   <listitem>
8139    <para>
8140     ID of RapdiIO interface
8141    </para>
8142   </listitem>
8143  </varlistentry>
8144  <varlistentry>
8145   <term><parameter>destid</parameter></term>
8146   <listitem>
8147    <para>
8148     Destination ID of transaction
8149    </para>
8150   </listitem>
8151  </varlistentry>
8152  <varlistentry>
8153   <term><parameter>hopcount</parameter></term>
8154   <listitem>
8155    <para>
8156     Number of hops to target device
8157    </para>
8158   </listitem>
8159  </varlistentry>
8160  <varlistentry>
8161   <term><parameter>offset</parameter></term>
8162   <listitem>
8163    <para>
8164     Offset into configuration space
8165    </para>
8166   </listitem>
8167  </varlistentry>
8168  <varlistentry>
8169   <term><parameter>len</parameter></term>
8170   <listitem>
8171    <para>
8172     Length (in bytes) of the maintenance transaction
8173    </para>
8174   </listitem>
8175  </varlistentry>
8176  <varlistentry>
8177   <term><parameter>val</parameter></term>
8178   <listitem>
8179    <para>
8180     Value to be written
8181    </para>
8182   </listitem>
8183  </varlistentry>
8184 </variablelist>
8185</refsect1>
8186<refsect1>
8187<title>Description</title>
8188<para>
8189   Generates an MPC85xx write maintenance transaction. Returns <constant>0</constant> on
8190   success or <constant>-EINVAL</constant> on failure.
8191</para>
8192</refsect1>
8193</refentry>
8194
8195<refentry id="API-fsl-rio-setup">
8196<refentryinfo>
8197 <title>LINUX</title>
8198 <productname>Kernel Hackers Manual</productname>
8199 <date>July 2017</date>
8200</refentryinfo>
8201<refmeta>
8202 <refentrytitle><phrase>fsl_rio_setup</phrase></refentrytitle>
8203 <manvolnum>9</manvolnum>
8204 <refmiscinfo class="version">4.1.27</refmiscinfo>
8205</refmeta>
8206<refnamediv>
8207 <refname>fsl_rio_setup</refname>
8208 <refpurpose>
8209     Setup Freescale PowerPC RapidIO interface
8210 </refpurpose>
8211</refnamediv>
8212<refsynopsisdiv>
8213 <title>Synopsis</title>
8214  <funcsynopsis><funcprototype>
8215   <funcdef>int <function>fsl_rio_setup </function></funcdef>
8216   <paramdef>struct platform_device * <parameter>dev</parameter></paramdef>
8217  </funcprototype></funcsynopsis>
8218</refsynopsisdiv>
8219<refsect1>
8220 <title>Arguments</title>
8221 <variablelist>
8222  <varlistentry>
8223   <term><parameter>dev</parameter></term>
8224   <listitem>
8225    <para>
8226     platform_device pointer
8227    </para>
8228   </listitem>
8229  </varlistentry>
8230 </variablelist>
8231</refsect1>
8232<refsect1>
8233<title>Description</title>
8234<para>
8235   Initializes MPC85xx RapidIO hardware interface, configures
8236   master port with system-specific info, and registers the
8237   master port with the RapidIO subsystem.
8238</para>
8239</refsect1>
8240</refentry>
8241
8242     </sect1>
8243  </chapter>
8244
8245  <chapter id="credits">
8246     <title>Credits</title>
8247	<para>
8248		The following people have contributed to the RapidIO
8249		subsystem directly or indirectly:
8250		<orderedlist>
8251			<listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></para></listitem>
8252			<listitem><para>Randy Vinson<email>rvinson@mvista.com</email></para></listitem>
8253			<listitem><para>Dan Malek<email>dan@embeddedalley.com</email></para></listitem>
8254		</orderedlist>
8255	</para>
8256	<para>
8257		The following people have contributed to this document:
8258		<orderedlist>
8259			<listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></para></listitem>
8260		</orderedlist>
8261	</para>
8262  </chapter>
8263</book>
8264