^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) What: /sys/bus/rapidio/devices/nn:d:iiii
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) For each RapidIO device, the RapidIO subsystem creates files in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) an individual subdirectory with the following name format of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) device_name "nn:d:iiii", where:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) ==== ========================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) nn two-digit hexadecimal ID of RapidIO network where the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) device resides
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) d device type: 'e' - for endpoint or 's' - for switch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) iiii four-digit device destID for endpoints, or switchID for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) switches
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) ==== ========================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) For example, below is a list of device directories that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) represents a typical RapidIO network with one switch, one host,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) and two agent endpoints, as it is seen by the enumerating host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) (with destID = 1)::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) /sys/bus/rapidio/devices/00:e:0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) /sys/bus/rapidio/devices/00:e:0002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) /sys/bus/rapidio/devices/00:s:0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) NOTE:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) An enumerating or discovering endpoint does not create a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) sysfs entry for itself, this is why an endpoint with destID=1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) is not shown in the list.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) Attributes Common for All RapidIO Devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) -----------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) What: /sys/bus/rapidio/devices/nn:d:iiii/did
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) Date: Nov, 2005
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) KernelVersion: v2.6.15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) (RO) returns the device identifier
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) What: /sys/bus/rapidio/devices/nn:d:iiii/vid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) Date: Nov, 2005
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) KernelVersion: v2.6.15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) (RO) returns the device vendor identifier
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) What: /sys/bus/rapidio/devices/nn:d:iiii/device_rev
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) Date: Nov, 2005
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) KernelVersion: v2.6.15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) (RO) returns the device revision level
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) What: /sys/bus/rapidio/devices/nn:d:iiii/asm_did
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) Date: Nov, 2005
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) KernelVersion: v2.6.15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) (RO) returns identifier for the assembly containing the device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) What: /sys/bus/rapidio/devices/nn:d:iiii/asm_rev
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) Date: Nov, 2005
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) KernelVersion: v2.6.15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) (RO) returns revision level of the assembly containing the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) What: /sys/bus/rapidio/devices/nn:d:iiii/asm_vid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) Date: Nov, 2005
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) KernelVersion: v2.6.15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) (RO) returns vendor identifier of the assembly containing the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) What: /sys/bus/rapidio/devices/nn:d:iiii/destid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) Date: Mar, 2011
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) KernelVersion: v2.6.3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) (RO) returns device destination ID assigned by the enumeration
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) routine
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) What: /sys/bus/rapidio/devices/nn:d:iiii/lprev
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) Date: Mar, 2011
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) KernelVersion: v2.6.39
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) (RO) returns name of previous device (switch) on the path to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) device that that owns this attribute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) What: /sys/bus/rapidio/devices/nn:d:iiii/modalias
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) Date: Jul, 2013
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) KernelVersion: v3.11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) (RO) returns the device modalias
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) What: /sys/bus/rapidio/devices/nn:d:iiii/config
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) Date: Nov, 2005
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) KernelVersion: v2.6.15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) (RW) Binary attribute to read from and write to the device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) configuration registers using the RapidIO maintenance
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) transactions. This attribute is similar in behaviour to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) "config" attribute of PCI devices and provides an access to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) RapidIO device registers using standard file read and write
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) operations.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) RapidIO Switch Device Attributes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) --------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) RapidIO switches have additional attributes in sysfs. RapidIO subsystem supports
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) common and device-specific sysfs attributes for switches. Because switches are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) integrated into the RapidIO subsystem, it offers a method to create
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) device-specific sysfs attributes by specifying a callback function that may be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) set by the switch initialization routine during enumeration or discovery
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) process.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) What: /sys/bus/rapidio/devices/nn:s:iiii/routes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) Date: Nov, 2005
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) KernelVersion: v2.6.15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) (RO) reports switch routing information in "destID port" format.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) This attribute reports only valid routing table entries, one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) line for each entry.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) What: /sys/bus/rapidio/devices/nn:s:iiii/destid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) Date: Mar, 2011
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) KernelVersion: v2.6.3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) (RO) device destination ID of the associated device that defines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) a route to the switch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) What: /sys/bus/rapidio/devices/nn:s:iiii/hopcount
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) Date: Mar, 2011
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) KernelVersion: v2.6.39
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) (RO) number of hops on the path to the switch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) What: /sys/bus/rapidio/devices/nn:s:iiii/lnext
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) Date: Mar, 2011
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) KernelVersion: v2.6.39
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) (RO) returns names of devices linked to the switch except one of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) a device linked to the ingress port (reported as "lprev"). This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) is an array names with number of lines equal to number of ports
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) in switch. If a switch port has no attached device, returns
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) "null" instead of a device name.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) Device-specific Switch Attributes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) ---------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) IDT_GEN2-
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) What: /sys/bus/rapidio/devices/nn:s:iiii/errlog
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) Date: Oct, 2010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) KernelVersion: v2.6.37
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) (RO) reads contents of device error log until it is empty.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) RapidIO Bus Attributes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) ----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) What: /sys/bus/rapidio/scan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) Date: May, 2013
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) KernelVersion: v3.11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) Contact: Matt Porter <mporter@kernel.crashing.org>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) Alexandre Bounine <alexandre.bounine@idt.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) (WO) Allows to trigger enumeration discovery process from user
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) space. To initiate an enumeration or discovery process on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) specific mport device, a user needs to write mport_ID (not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) RapidIO destination ID) into this file. The mport_ID is a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) sequential number (0 ... RIO_MAX_MPORTS) assigned to the mport
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) device. For example, for a machine with a single RapidIO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) controller, mport_ID for that controller always will be 0. To
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) initiate RapidIO enumeration/discovery on all available mports a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) user must write '-1' (or RIO_MPORT_ANY) into this attribute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) file.