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