'\" t .\" Title: rio_setup_device .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: Internals .\" Source: Kernel Hackers Manual 4.12.2 .\" Language: English .\" .TH "RIO_SETUP_DEVICE" "9" "July 2017" "Kernel Hackers Manual 4\&.12\&" "Internals" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" rio_setup_device \- Allocates and sets up a RIO device .SH "SYNOPSIS" .HP \w'struct\ rio_dev\ *\ rio_setup_device('u .BI "struct rio_dev * rio_setup_device(struct\ rio_net\ *\ " "net" ", struct\ rio_mport\ *\ " "port" ", u16\ " "destid" ", u8\ " "hopcount" ", int\ " "do_enum" ");" .SH "ARGUMENTS" .PP \fIstruct rio_net * net\fR .RS 4 RIO network .RE .PP \fIstruct rio_mport * port\fR .RS 4 Master port to send transactions .RE .PP \fIu16 destid\fR .RS 4 Current destination ID .RE .PP \fIu8 hopcount\fR .RS 4 Current hopcount .RE .PP \fIint do_enum\fR .RS 4 Enumeration/Discovery mode flag .RE .SH "DESCRIPTION" .PP Allocates a RIO device and configures fields based on configuration space contents\&. If device has a destination ID register, a destination ID is either assigned in enumeration mode or read from configuration space in discovery mode\&. If the device has switch capabilities, then a switch is allocated and configured appropriately\&. Returns a pointer to a RIO device on success or NULL on failure\&. .SH "AUTHOR" .PP \fBMatt Porter\fR <\&mporter@kernel.crashing.org\&>, <\&mporter@mvista.com\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br