linux/drivers/rapidio/rio-scan.c
<<
>>
Prefs
   1/*
   2 * RapidIO enumeration and discovery support
   3 *
   4 * Copyright 2005 MontaVista Software, Inc.
   5 * Matt Porter <mporter@kernel.crashing.org>
   6 *
   7 * Copyright 2009 Integrated Device Technology, Inc.
   8 * Alex Bounine <alexandre.bounine@idt.com>
   9 * - Added Port-Write/Error Management initialization and handling
  10 *
  11 * Copyright 2009 Sysgo AG
  12 * Thomas Moll <thomas.moll@sysgo.com>
  13 * - Added Input- Output- enable functionality, to allow full communication
  14 *
  15 * This program is free software; you can redistribute  it and/or modify it
  16 * under  the terms of  the GNU General  Public License as published by the
  17 * Free Software Foundation;  either version 2 of the  License, or (at your
  18 * option) any later version.
  19 */
  20
  21#include <linux/types.h>
  22#include <linux/kernel.h>
  23
  24#include <linux/delay.h>
  25#include <linux/dma-mapping.h>
  26#include <linux/init.h>
  27#include <linux/rio.h>
  28#include <linux/rio_drv.h>
  29#include <linux/rio_ids.h>
  30#include <linux/rio_regs.h>
  31#include <linux/module.h>
  32#include <linux/spinlock.h>
  33#include <linux/timer.h>
  34#include <linux/sched.h>
  35#include <linux/jiffies.h>
  36#include <linux/slab.h>
  37
  38#include "rio.h"
  39
  40LIST_HEAD(rio_devices);
  41
  42static void rio_init_em(struct rio_dev *rdev);
  43
  44DEFINE_SPINLOCK(rio_global_list_lock);
  45
  46static int next_destid = 0;
  47static int next_comptag = 1;
  48
  49static int rio_mport_phys_table[] = {
  50        RIO_EFB_PAR_EP_ID,
  51        RIO_EFB_PAR_EP_REC_ID,
  52        RIO_EFB_SER_EP_ID,
  53        RIO_EFB_SER_EP_REC_ID,
  54        -1,
  55};
  56
  57
  58/**
  59 * rio_destid_alloc - Allocate next available destID for given network
  60 * @net: RIO network
  61 *
  62 * Returns next available device destination ID for the specified RIO network.
  63 * Marks allocated ID as one in use.
  64 * Returns RIO_INVALID_DESTID if new destID is not available.
  65 */
  66static u16 rio_destid_alloc(struct rio_net *net)
  67{
  68        int destid;
  69        struct rio_id_table *idtab = &net->destid_table;
  70
  71        spin_lock(&idtab->lock);
  72        destid = find_first_zero_bit(idtab->table, idtab->max);
  73
  74        if (destid < idtab->max) {
  75                set_bit(destid, idtab->table);
  76                destid += idtab->start;
  77        } else
  78                destid = RIO_INVALID_DESTID;
  79
  80        spin_unlock(&idtab->lock);
  81        return (u16)destid;
  82}
  83
  84/**
  85 * rio_destid_reserve - Reserve the specivied destID
  86 * @net: RIO network
  87 * @destid: destID to reserve
  88 *
  89 * Tries to reserve the specified destID.
  90 * Returns 0 if successfull.
  91 */
  92static int rio_destid_reserve(struct rio_net *net, u16 destid)
  93{
  94        int oldbit;
  95        struct rio_id_table *idtab = &net->destid_table;
  96
  97        destid -= idtab->start;
  98        spin_lock(&idtab->lock);
  99        oldbit = test_and_set_bit(destid, idtab->table);
 100        spin_unlock(&idtab->lock);
 101        return oldbit;
 102}
 103
 104/**
 105 * rio_destid_free - free a previously allocated destID
 106 * @net: RIO network
 107 * @destid: destID to free
 108 *
 109 * Makes the specified destID available for use.
 110 */
 111static void rio_destid_free(struct rio_net *net, u16 destid)
 112{
 113        struct rio_id_table *idtab = &net->destid_table;
 114
 115        destid -= idtab->start;
 116        spin_lock(&idtab->lock);
 117        clear_bit(destid, idtab->table);
 118        spin_unlock(&idtab->lock);
 119}
 120
 121/**
 122 * rio_destid_first - return first destID in use
 123 * @net: RIO network
 124 */
 125static u16 rio_destid_first(struct rio_net *net)
 126{
 127        int destid;
 128        struct rio_id_table *idtab = &net->destid_table;
 129
 130        spin_lock(&idtab->lock);
 131        destid = find_first_bit(idtab->table, idtab->max);
 132        if (destid >= idtab->max)
 133                destid = RIO_INVALID_DESTID;
 134        else
 135                destid += idtab->start;
 136        spin_unlock(&idtab->lock);
 137        return (u16)destid;
 138}
 139
 140/**
 141 * rio_destid_next - return next destID in use
 142 * @net: RIO network
 143 * @from: destination ID from which search shall continue
 144 */
 145static u16 rio_destid_next(struct rio_net *net, u16 from)
 146{
 147        int destid;
 148        struct rio_id_table *idtab = &net->destid_table;
 149
 150        spin_lock(&idtab->lock);
 151        destid = find_next_bit(idtab->table, idtab->max, from);
 152        if (destid >= idtab->max)
 153                destid = RIO_INVALID_DESTID;
 154        else
 155                destid += idtab->start;
 156        spin_unlock(&idtab->lock);
 157        return (u16)destid;
 158}
 159
 160/**
 161 * rio_get_device_id - Get the base/extended device id for a device
 162 * @port: RIO master port
 163 * @destid: Destination ID of device
 164 * @hopcount: Hopcount to device
 165 *
 166 * Reads the base/extended device id from a device. Returns the
 167 * 8/16-bit device ID.
 168 */
 169static u16 rio_get_device_id(struct rio_mport *port, u16 destid, u8 hopcount)
 170{
 171        u32 result;
 172
 173        rio_mport_read_config_32(port, destid, hopcount, RIO_DID_CSR, &result);
 174
 175        return RIO_GET_DID(port->sys_size, result);
 176}
 177
 178/**
 179 * rio_set_device_id - Set the base/extended device id for a device
 180 * @port: RIO master port
 181 * @destid: Destination ID of device
 182 * @hopcount: Hopcount to device
 183 * @did: Device ID value to be written
 184 *
 185 * Writes the base/extended device id from a device.
 186 */
 187static void rio_set_device_id(struct rio_mport *port, u16 destid, u8 hopcount, u16 did)
 188{
 189        rio_mport_write_config_32(port, destid, hopcount, RIO_DID_CSR,
 190                                  RIO_SET_DID(port->sys_size, did));
 191}
 192
 193/**
 194 * rio_local_set_device_id - Set the base/extended device id for a port
 195 * @port: RIO master port
 196 * @did: Device ID value to be written
 197 *
 198 * Writes the base/extended device id from a device.
 199 */
 200static void rio_local_set_device_id(struct rio_mport *port, u16 did)
 201{
 202        rio_local_write_config_32(port, RIO_DID_CSR, RIO_SET_DID(port->sys_size,
 203                                did));
 204}
 205
 206/**
 207 * rio_clear_locks- Release all host locks and signal enumeration complete
 208 * @net: RIO network to run on
 209 *
 210 * Marks the component tag CSR on each device with the enumeration
 211 * complete flag. When complete, it then release the host locks on
 212 * each device. Returns 0 on success or %-EINVAL on failure.
 213 */
 214static int rio_clear_locks(struct rio_net *net)
 215{
 216        struct rio_mport *port = net->hport;
 217        struct rio_dev *rdev;
 218        u32 result;
 219        int ret = 0;
 220
 221        /* Release host device id locks */
 222        rio_local_write_config_32(port, RIO_HOST_DID_LOCK_CSR,
 223                                  port->host_deviceid);
 224        rio_local_read_config_32(port, RIO_HOST_DID_LOCK_CSR, &result);
 225        if ((result & 0xffff) != 0xffff) {
 226                printk(KERN_INFO
 227                       "RIO: badness when releasing host lock on master port, result %8.8x\n",
 228                       result);
 229                ret = -EINVAL;
 230        }
 231        list_for_each_entry(rdev, &net->devices, net_list) {
 232                rio_write_config_32(rdev, RIO_HOST_DID_LOCK_CSR,
 233                                    port->host_deviceid);
 234                rio_read_config_32(rdev, RIO_HOST_DID_LOCK_CSR, &result);
 235                if ((result & 0xffff) != 0xffff) {
 236                        printk(KERN_INFO
 237                               "RIO: badness when releasing host lock on vid %4.4x did %4.4x\n",
 238                               rdev->vid, rdev->did);
 239                        ret = -EINVAL;
 240                }
 241
 242                /* Mark device as discovered and enable master */
 243                rio_read_config_32(rdev,
 244                                   rdev->phys_efptr + RIO_PORT_GEN_CTL_CSR,
 245                                   &result);
 246                result |= RIO_PORT_GEN_DISCOVERED | RIO_PORT_GEN_MASTER;
v+code=KERN_I+code=destid" class="sref">vid" cid" c24;4.4x\n",
 244                                   rdev->phys_efptr + rdf="+code=destid_table" c2ass="24lass="sref">did);
);
 245                         io/rio-sc2n.c#L149" id="L149" clas2="lin25ss="sref">EINVAL;
idta2->                }
, fr 174
 245                         iment">/* tab->25s="sref">result);
idtab2/a>->
 2" clinitializio/rio-scpidio/rio-sc"drivers/rapidio/rio-scan.c#L206" id="L206" cleode=RIO_P->
 227rio-isso-scransacme="L210"> 210 * Marks t="sref">u26)
/**
 22737"> 2" cls/rapidio/rio-sregi> 22="drivers/rapidio/rio-scan.c#L108" id="L108" 2io/rio-sc2n.c#L159" id="L159" clas2="lin2" name="L159"> 159
idta2 name="L160"> 160/**
 212 * each device_id2- Get the base/extended 2evice2id for a device
 242                 * 2port:2RIO mament"> */
 214rapidio/rio-scan.c#L216" id="L216" class="line" name="L216"> 216        s(struct  * @destid: De2tinat2on ID > 235                if (( * @hopcou2t: Ho26 name="L114"> 114
 218         165destid_table;
loc 2273/rio-scan.c#L221" ief="L242"> 242                u2a>2* 8/126lass="sref">rdev;
 222        rio_local_write_config_32(port,  168did);
pidio/rio-scan.c#L233" id="L233" class="line" name="L233"> 233                                    port->ref">u8 ret = 0;
 170{
 224        rio_local_read_config_32(port, from 233                                    result);
c 2273t_writ2" clinit3t_writ2ctame="L242"> 242                start;
 224         233                                    port->r the bas2.c#L176" id="L176" class2"line27ass="sref">lock)19" id="L219" class="line" name="L219"> 2io/rio-sc2n.c#L177" id="L177" clas2="lin27ss="sref">destid;
 178 158}
 1802span class="comment"> * 2port:2RIO master port
 22="drivers/rapidio/rio-scan.c#L108" id="L108" 2pan class2"comment"> * @destid: De2tinat2on ID of device
 227rio-isso-scransacme="L210"> 210 * Marks ta> * @hopcou2t: Ho2count to device
 210 * Marks taan class2omment"> * @did: Device 2D val2e to be written
 210 * Marks tao/rio-sc2" name="L184"> 184 *
 210 * Marks tasys_size2tes the base/extended de2ice i2 from a device.
 210 * Marks ta the bas2 name="L186"> 186
 210 * Marks tao/rio-sc2ef">u16  212 * each o/rio-sca2.c#L188" id="L188" class2"line28from a device.
,  */
 214rapidio/rio-scan.c#L216" id="L216" class="line" name="L216"> 216        s, */
 216 src_ops=port" class="sref">port, sys2size, >>>>>>>>>>>>>>>>>146{
 235                if (( 172
o-scan.c#L236" i7">od="L239read_config_32" claOPS_REA               result |= OPS_WRITE              result |= OPS_ATOMIC_T(result |= OPS_ATOMIC_INC              result |= OPS_ATOMIC_DEC              result |= OPS_ATOMIC_SET              result |= OPS_ATOMIC_CLcal_read_config_32 218         193result);
 174 216 src_ops=por="sref">resultr   opsef="+code=vid" c   opsa hre" classn.c#L218" id="L7">o-scan.c#L236" i7">od="Lef="+code=port" class="sref">port->> 1952span class="comment"> * 2port:29s="sref">result);
 * @did: Device 2D val29name="L176"> 176}
 197 *
 * Wr2tes the base/extended de2ice i2 from a device.
 199


 212 * each3ort-&3t;
 212 * each3o4t-&3tname="L193"> 193
 */
 214" clasef="+code=vid" cn.c#L1816" class="line" na7" n.c#L243" id="L7" ass=eOCK_CSR" class=;
from)
 206hport;
 217        struct  188{
 217     239read_config_32"t3" rs/rapidio/rio-scan.ct3" rs/rapL200"4"> 224    7" n.c#L243" id="L7" ass=e   struct  209 149
did));
 191}
 213/**
 *

 22="drivers/rapidio/rio-scan.c#L108" id="L108" 3"sref">ri3_dev *
 
 212 * each319   3    int 
 212 * each3io/rio-sc3n.c#L220" id="L220" clas3="lin32IO master port
/* Release h3st de3ice idment"> */
 214rapidio/rio-scan.c#L217" id="L217" class="line" name="L217"> 217     eOCK_CSR" class=;
RIO3HOST_D"sref">from)
host_deviceom);
 24444"216"> 216  efL235" classref">result |= PEF_SWITCHal_read_config_32, 174result &am3; 0xffff) != 0ck)19" id="L219" class="line" name="L219"> 3printkdid));

ret<3a> = -
ular vendme=s clch"drivers/rapidio/rio-scan.c#L206" id="L206" c3ro/rio-sc3 id="L230" class="line" 3ame="33IO master port
,3
RIO33ount to device
/**

 210 * Marks 3code=resu3t" class="sref">result &am33IO master port
 4outef"se="L212"> 212 * each3printk
 */
 214rapidio/rio-scan.c#L217" id="L217" class="line" name="L217"> 217     , */
r3ev->from)
ret<3a> = -EINline" name="L214"> 214r clch_opsef="+code=vid" r clch_opsid="L217" class="linecu                cu     239read_config_32"__ef">d_r clch_opsef="+code=vid" __ef">d_r clch_ops       struct  2341s="sref">EINline" name="L214"> 214r clch_opsef="+code=vid" r clch_opsid="L217" class="lineendef="+code=vid" end    239read_config_32"__end_r clch_opsef="+code=vid" __end_r clch_ops       struct ,3n.c#L241" id="L241" clas3="lin34name="L191"> 191}
/*3Mark device as discovere3 and 3nable master *whi"li/a>);
resultendef="+code=vid" end    5"> 235                if ((rdev,om 238                 =39read_config_32"scan.c#L238" id="L238" class="line" name="L238"> 238                e" clas classhref="drivers/racu                cu     s="line" name="L238" href="+code=vid" class=" =39read_config_32"scan.c#L238" id="L238" class="line" name="L238"can.c#L203" id="L203" class"> 235                if ((RI3_PORT_GEN_CTL_CSR,
 244r17"bug"216"> 216  r17"bugme="L2s/rapidio/rio-scan.c#L237" id="c.c#nameinit34outef"rfid="L212s       "RIO: badness when re3         3&result);_CSR,
 24de=ref="+code=vid" de=rme="L2="lin24:L200" id="L200" class="l->R3O_PORT_GEN_MASTER;
 24cu                cu     s="line" name="L238"init_hooo-scan.c#L236" iinit_hooome="L2="lin24:L200" id="L200" class="l->(vid" 3id" c34;4.4x\n",
r3f="+code=destid_table" c3ass="34lass="sref">did);sref">did));
EINVAL;name="L244"> 24cu                cu     ++   struct idta3->EINsref">did));
 191}
/*3tab-> 24444"216"> 216  efL235" classref">result |= PEF_STD_RT               235                if ((35">host_deviceid);
 216  r17"bugme="L2s/rapidio/rio-scan.c#L237" id="addnameSTD34outefg opsname="L212s       "RIO: badness when re3c#L154" i3="L154" class="line" nam3="L1535PORT_GEN_CTL_CSR,
 24de=ref="+code=vid" de=rme="L2="lin24:L200" id="L200" class="l->idtab3/a>->result);
 24rs clchidio/rio-scan.c#s clchass=ine" name="L244"> 24addpidio/rio-scan.c#L231addpidio/    239read_config_32"rtd_rtd_->;
 24rs clchidio/rio-scan.c#s clchass=ine" name="L244"> 24getpidio/rio-scan.c#L231getpidio/    239read_config_32"rtd_rtd_),
 24rs clchidio/rio-scan.c#s clchass=ine" name="L244"> 24clr_rs="l               clr_rs="l    239read_config_32"rtd_rtd_r3.c#L158" id="L158" class3"line359s="sref">EINsref">did));
ret = 0;
idta3 name="L160"> 160 24rs clchidio/rio-scan.c#s clchass=ine" name="L244"> 24addpidio/rio-scan.c#L231addpidio/    2|| !
 24rs clchidio/rio-scan.c#s clchass=ine" name="L244"> 24getpidio/rio-scan.c#L231getpidio/    eOCK_CSR" class=;
net_list) {
2s/rapidio/rio-scan.c#L237" id="mi2"name4outefg opsname="L212s       "RIO: badness when re3> 1623span class="comment"> * 3port:36OST_DID_LOCK_CSR,
 24de=ref="+code=vid" de=rme="L2="lin24:L200" id="L200" class="l-> * @destid: De3tinat36ass="sref">did));
 * @hopcou3t: Ho36name="L204"> 204}
 165 205
/**
3* 8/136ation complete
 168
u8 
idta3.c#L170" id="L170" class3"line37IO master port
 
 212 * each3o 1623n.c#L172" id="L172" clas3="lin37AL on failure.
 */
2ame="L244"> 24addp" clasef="+code=vid" addp" clasass="line" name="L214"> 214rapidio/rio-scan.c#L217" id="L217" class="line" name="L217"> 217     eOCK_CSR" class=;
net)
st*/
 176}
rdev;
port 178resum);
EINVAL; 174
 1803span class="comment"> * 3port:38                }
 * @destid: De3tinat38ce id locks */
port * @hopcou3t: Ho38 name="L172"> 172
portport * @did: Device 3D val38">host_deviceid);
port 184 204}
start;
 186 176}
u16 rck)19" id="L219" class="line" name="L219"> 3o/rio-sca3.c#L188" id="L188" class3"line38from sref">did));
ret = 0;
sys3size, 

 193
 227ra2sociated= clasrs/rrs/rnetwork  drivers/rapidio/rio-scan.c#L108" id="L108" 3io/rio-sc3d - Set the base/extende3 devi39 id for a port
rors/rwise a farrscan.c#Lo-r1" ced="drivers/rapidio/rio-scan.c#L108" id="L108" 3> 1953span class="comment"> * 3port:39IO master port
 * @did: Device 3D val39t: RIO network
 197 *
r(-numb227onrs clch)ero-ass="lionra farre cls/clas"drivers/rapidio/rio-scan.c#L206" id="L206" c3nt"> * Wr3tes the base/extended de3ice i3 from a device.
 199
 22="drivers/rapidio/rio-scan.c#L108" id="L108" 4a1s="line4 ize, 
-&4t;
=rdev" class="saL21ins="l_rx_tx_ass="line" name="L214"> 214rapidio/rio-scan.c#L216" id="L216" class="line" name="L216"> 216        s,s/rapidio/rio-scan.c#L213" id="L213" c4o4t-&4tname="L193"> 193rdev,
(-&4t - Set the base/extende4"line40PORT_GEN_CTL_CSR,
( 216     _ne"    e"> 235                if (( 216 CONFIG_RAPIDIO_ENABLE_RX_TX"+codS="sref">ret = 0;
 206hpa>(rdev;
 158}
 209 ter port

 172
 216  r17"bugme="L2s/rapidio/rio-scan.c#L237"aL21ins="l_rx_tx_(4" clo=="L212d,3t_writ2=="L212d,3hopcounv2=="    -&4 name="L213"> 213rdev,
2s/rapidio/rio-scan.c#L237""L212d,3    _ne"2=="L212d)       
(( 216     _ne"    e   struct  * 204}
start;
 id="_getp    efbio/rio-scan.c#L216" id="_getp    efbme="L2="lin24:L200"     ( 176}
ri4_dev *rum);
 235                if (( did);read_config_32"rivers/rapidio/rio-scan.c#L224" id="L224" class="line" name="L224"> 224                        if ((EINVAL;"sref">did);read_config_32"ef="+codesref">rdev->portgvcl               21gvcl    e   struct /* Release h4st de42ce id locks *} else"> 235                if ((RIO42OST_DID_LOCK_CSR,om);
 224                        if ((host_deviceid);
rdev->( 216     _ne"    et" class="sref">portgvcl               21gvcl    e2<ss0eOCK_CSR" class=;
,,,,,,,,, 174portresult &am4; 0xffff) != 0sref">did));
 176}
rum);
result |= Pcodehys_efP_TYP_Se=RIO_PORT_GEN_DISCOVERED"hys_efP_TYP_Se= 235                if ((did);rret<4a> = -EINVAL;name="L244"> 24a>gvcl               21gvcl    "39read_config_32"<>gvcl               21gvcl    ""sref">result |=  176}
result |= ,4 235                if ((RIO43OST_DID_LOCK_CSR,r-&4+code=host_deviceid" cla4s="sr43">host_deviceid);
gvcl               21gvcl    ""sref">result |=  176}
,
result |= result &am43 0xffff) != 0sref">did));
 176}
rum);
 235                if ((r4ev->did);read_config_32"rivers/rapidio/rio-scan.c#L222" id="L222" class="line" name="L222"> 222                        if ((ret<4a> = -EINVAL;"sref">did);>did);read_config_32"ef="+codesref">rdev->gvcl               21gvcl    e   struct  2441s="sref">EIN} else"> 235                if ((net_list) {om);
 224                        if ((/*4Mark device as discovere4 and 44OST_DID_LOCK_CSR,
rdev->( 216     _ne"    et"s="sref">portgvcl               21gvcl    e2<ss0eOCK_CSR" class=;
rdev,,,,,,,,, 174portRI4_PORT_GEN_CTL_sref">did));
did));
R44ass="sref">lock)19" id="L219" class="line" name="L219"> 4casing ho4stid" class="sref">vid" 4id" c44ss="sref">destid;
r4f="+code=destid_table" c4ass="44name="L158"> 158}
idta4->
,4max, 
/*4tab-> 227rio-se clcransacme="e"drivers/rapidio/rio-scan.c#L206" id="L206" c4rread_con4_INVALID_DESTID" class="4ref">45 to be written
->
->
) *
 210 * Marks 4e"sref">r4.c#L158" id="L158" class4"line45from a device.
 22, als/rapidio/rL210"> 210 * Marks 4io/rio-sc4n.c#L159" id="L159" clas4="lin46d for a device
 210 * Marks 4ief">idta4 name="L160"> 160
 210 * Marks 4ices,4- Get the base/extended 4evice46n ID of device
 1624span class="comment"> * 4port:46ount to device
 212 * each4pan class4"comment"> * @destid: De4tinat46 to be written
 212 * each4p/rio-sca4ass="comment"> * @hopcou4t: Ho46 id for a port
 165 line" name="L214"> 214rapidio/rio-scan.c#L217" id="Lame="L214"> 214_p" clnitidio/rio-scan.c_p" clnitref">217" class="line"L21sk 214netidio/rio-scan.c#L21netref">217" class="linenetidio/rio-scan.cnetref"< 235                if (( 214rapidio/rio-scan.c#L216" id="L216" class="line" name="L216"> 216        s, dev;
4* 8/146;4.4x\n",
,

 168from)
u8 EIN*/
=)19" id="L219" class="line" name="L219"> 4ref">idta4.c#L170" id="L170" class4"line471s="sref">EINline" name="L214"> 214rapidio/rio-scan.c#L217" id="L217" class="line" name="L217"> 217        struct  EINline" name="L214"> 214s clchidio/rio-scan.c#L21s clchass=L217" class="line"s clchidio/rio-scan.c#s clchass="39read_config_32"NULLidio/rio-scan.cNULL       struct 4n.c#L172" id="L172" clas4="lin473s="sref">EIN*/
host_deviceid);
=)19" id="L219" class="line" name="L219"> 4rass="lin4/a>,  4r the bas4.c#L176" id="L176" class4"line47ass="sref">hpa>( 214rapidio/rio-scan.c#L217" id="e   struct rum);
 224                        if (( 178did); hrefOCK_CSR,
portsultidio/rio-scan.c#esult   s)eOCK_CSR" class=;
EINVAL; 174
 1804span class="comment"> * 4port:48                }
 * @destid: De4tinat48ce id locks *um);
result |=  235                if (( * @hopcou4t: Ho48OST_DID_LOCK_CSR,r>);
 224                        if (( * @did: Device 4D val48lass="sref">rdev,,,,,,,,,fOCK_CSR,
port 184,um);
 235                if ((result);/a>,
 216  |= GET_TOTAL"+codS="L224"> 224    swpinfoidio/rio-scan.cswpinforef"e * 235                if (( 186;
u16 destid;
EINsref">did));
ret = 0;
sys4size, EIN17" class="line" name="L217"> 217     "39read_config_32"kzal" cme="L217"> 217 224    sizeidio/rio-scan.csize cla,9read_config_32"GFP_="L2ELidio/rio-scan.cGFP_="L2ELass=e   struct  193host_deviceid);
 * 4port:49ass="sref">start;
 24444"216"> 216  efL235"39read_config_32"<>sultidio/rio-scan.c#esult   s   struct  * @did: Device 4D val49ass="sref">hpa>( 24swpinfoidio/rio-scan.cswpinforef">=)name="L244"> 24swpinfoidio/rio-scan.cswpinforef"   struct  197rdev;
 224         * Wr4tes the base/extended de4ice i49lass="sref">did); hrefOCK_CSR, class="sref">portsultidio/rio-scan.c#esult   s)   struct  199hpa>( 24 href="+code=vid" class=" =9read_config_32"<>sultidio/rio-scan.c#esult   s ="li="li 16   struct EIN17" class="line" name="L217"> 217     s="line" name="L238"> 238                 =9read_config_32"<>sultidio/rio-scan.c#esult   s =class0xffff   struct 
 224        -&5t;,
, class="sref">port-&5tname="L193"> 193host_deviceid);
 224        -&5t - Set the base/extende5"line50PORT_GEN_CTL_CSR,
portsultidio/rio-scan.c#esult   s)   struct -&5tpan class="comment"> * 5="lin50ass="sref">start;
 24asm_ href="+code=vid" asm_ hrss=" =9read_config_32"<>sultidio/rio-scan.c#esult   s ="li="li 16   struct -&5tmment"> * @did: Device 5n cla50ass="sref">hpa>( 24asm_> 238         asm_> 2     =9read_config_32"<>sultidio/rio-scan.c#esult   s =class0xffff   struct -&5t name="L197"> 197rdev;
 224        -&5tes the base/extended de5RIO n50lass="sref">did); hrefOCK_CSR, class="sref">portsultidio/rio-scan.c#esult   s)   struct  209hpa>( 24asm_r" n.c#L243" id="Lasm_r" ss=" =9read_config_32"<>sultidio/rio-scan.c#esult   s ="li="li 16   struct  24444"216"> 216  efL235" classref="drivers/ra |= PEF_EXT_FEATURESL216"> 216  |= PEF_EXT_FEATURES    e"> 235                if ((net_list) {
 24ef                  ef       239read_config_32"<>sultidio/rio-scan.c#esult   s =class0xffff   struct ,r>);
 244hys_ef                  4hys_ef       239read_config_32" id="_getp    efbio/rio-scan.c#L216" id="_getp    efbme="L2="lin24:L200"     -&5 name="L213"> 213rdev,








































read_config_32"hopcounv#L215" idapidiohopcounv-&5io_net * 204}
result);
 24em_ef                  em_ef       239read_config_32" id="_getpfeatursidio/rio-scan.c#L21 id="_getpfeatursme="L2="lin24:L200"     -&5/a>->;
-&5_dev *rsref">did));
  158}
hpa>( 224        port/* Release h5st de52ce id locks */
 224        RIO52OST_DID_LOCK_CSR,>>>>>>>>>>>>>>>>, class="sref">port-&5+code=host_deviceid" cla5s="sr52 to b  struct ;
 235                if ((result &am52s="sref">result);
;om;
 235                if (( 224     r_er                 r_er ="L224s/rapidio/rio-scan.c#L237" id="Cerpondid);;;;;;;;;goio-4"> 224    cleanup               cleanupref"   struct ret<5a> = -EINVAL;sref">did));
 224                        if ((net_list) {{{{{{{{{{{{{{{{{{{{{{{{{{{ref="drivers/ra |=_COMPONENT_TAG>rdev->RIO53OST_DID_LOCK_CSR,r="sref">port-&5+code=host_deviceid" cla5s="sr53">host_device}  else"> 235                if ((,/
 224                        if ((result &am53s="sref">result);/a>,
rdeass=, 235                if ((;
port-&5t lock on vid %4.4x 5id 5lass="sref">rsref">did));
r5ev-> 158}
ret<5a> = -EINum);
 224         235                if (( 2541ble master */om;
 235                if ((net_list) {CSR,/
 224        /*5Mark device as discovere5 and 54OST_DID_LOCK_CSR,
,/
-&5ig_32(rdev,,,,,,,,,read_config_32"next_7"writ.c#L200" id="L2next_7"writ    239read_config_32"7"writ_al" cme="L217"> 217<7"writ_al" c="L224"> 224    netidio/rio-scan.cnetref")   struct RI54PORT_GEN_CTL_CSR,} else  struct result);/a>,
get"7" nameit.c#L200" id="L2a16"get"7" nameit="L224"> 224        R54name="L176"> 176}
vid" 5id" c54;4.4x\n",
=)1xff   struct r5f="+code=destid_table" c5ass="549s="sref">EINs else"> 235                if ((EINVAL;nidta5->
,5max, 
/*5tab->port55">host_deviceid);
=)ne" name="L238"hopcounv#L215" idapidiohopcounvdid));
 5eode=RIO_5->hpa)rum);
s clchidio/rio-scan.c#L21is>s clch="L224"> 224    rc#L244" id="L244" class="lee"> 235                if ((r5.c#L158" id="L158" class5"line55lass="sref">did);read_config_32"EINVAL;name="L244"> 24as clchidio/rio-scan.c#s clchass=s="line" name="L238"s clchit.c#L200" id="L2s clchitass="39read_config_32"acan.c#L238" id="L238" class="line" name="L238"verp_tagidio/rio-scan.cverp_tag    2 classref="drivers/ra |= CTAG>UDEVIDv->idta5 name="L160"> 160/
=)1   struct ,5- Get the base/extended 5evice56sref">net_list) {
 217                if (( * 5port:56OST_DID_LOCK_CSR,>>>>>>>>>>>>>>>>,) {
 216  |= MAX_ROUTE_ENTRIES="L224"> 224        sizeidio/rio-scan.csys>sizerom ), 235                if (( * @destid: De5tinat56lass="sref">rdev,























ne" name="L238"GFP_="L2ELidio/rio-scan.cGFP_="L2ELass=e   struct  * @hopcou5t: Ho56PORT_GEN_CTL_CSR,um 165result);/a>,
 224    cleanup               cleanupref"   struct ;a5* 8/156;4.4x\n",for;
=)1  dev;
 216  |= MAX_ROUTE_ENTRIES="L224"> 224        sizeidio/rio-scan.csys>sizerom )   struct r5 name="L168"> 168did); hrefOCK_CSRdev;
u8 EINVAL;"sref">d
;
 216  |= INVALID_ROUTEref"   struct idta5.c#L170" id="L170" class5"line571ble master *//
port net_list) {{{{{{{{{{{{{{name="L244"> 24as clchidio/rio-scan.c#s clchass=s="line" name="L238"s clchit.c#L200" id="L2s clchitass=)   struct 5n.c#L172" id="L172" clas5="lin57OST_DID_LOCK_CSR,r>);
 224    rc#L244" id="L244" class="ll_read_config_32"7" ine"n.c#L243" id="L7" ine"    e   struct , result);/a>,
 224        ;
 216  |= GLOBAL_TABLE    e   struct r5 name="L178"> 178did);read_config_32"list_add_tail               tist_add_tail="L22 class="sref">portportret = 0;
 * 5port:581s="sref">EIN} else"> 235                if (( * @destid: De5tinat58sref">net_list) {om;
                if (( * @hopcou5t: Ho58OST_DID_LOCK_CSR,id);r * @did: Device 5D val58lass="sref">rdev,,,,,,,,,r>);
 224         184 204}
result);/
port 186;
portu16 rsref">did));
 158}
hpa>( 24 " .c#L200" id="L2t_ ass=.name="L244"> 24bue=rdev" class="sbue cla>=) class="sref">portsys5size, EIN17" class="line" name="L217"> 217     ine" name="L244"> 24 " .c#L200" id="L2t_ ass=.name="L244"> 24parport5n.c#L192" id="L192" clas5="lin59OST_DID_LOCK_name="L244"> 24 " nameinitialize.c#L200" id="L2t_ nameinitialize="L22 class="sref">port 193host_deviceid);
 217     ine" name="L244"> 24 " .c#L200" id="L2t_ ass=.name="L244"> 24releassidio/rio-scan.c#eleassass="39read_config_32"aL21#eleass_rapidio/rio-scan.c#L21#eleass_rapref"   struct host_deviceid);
 224    rc#L244" id="L244" class="le   struct  * 5port:59ass="" id="L219" class="line" name="L219"> 5i the bas5omment"> * @did: Device 5D val59ass="sref">hpa>( 24dma_mask 197rdev;
 217     ine" name="L244"> 24 " .c#L200" id="L2t_ ass=.name="L244"> 24dma_maskportddev;
 217     ine" name="L244"> 24 " .c#L200" id="L2t_ ass=.name="L244"> 24coher 199ret = 0;
,  24dst_ope=rdev" class="sdst_openet_list) {
port 216  |= DOORBELL_RESOURCE cla],  struct -&6t;,
, _0l_0xffffe   struct -&6tname="L193"> 193-&6t - Set the base/extende6"line605>host_deviceid);
=)
 224    rc#L244" id="L244" class="le   struct -&6tpan class="comment"> * 6="lin60ass="sref">stum);
                if (( * @did: Device 6n cla60_PORT_GEN_MASTER;goio-4"> 224    cleanup               cleanupref"   struct -&6t name="L197"> 197-&6tes the base/extended de6RIO n60lass="sref">d 174
 217        struct  209ret = 0;
 224    cleanup               cleanupref":ef">ret = 0;
net_lisum);
ret = 0;
 224    rs clchidio/rio-scan.c#s clchass=s="line" name="L238"route_tablsidio/rio-scan.c#oute_tablsass=e   struct -&6 name="L213"> 213-&6io_net * 224    rc#L244" id="L244" class="le   struct resu 174
-&6/a>->did));
    6    int /* Release h6st de62n ID of device
-&6DID_LOCK_CSR" class="sre6">RIO62OST_Dof device
-&6+code=host_deviceid" cla6s="sr62 to bof device

result &am62s="srof device
-&6(
-&6lock on master port, res6lt >4.4xof device
ret<6a> = - 214mapidio/rio-scan.c#L216"mrio_locae*="> 224         224    u.c#L215" idapidio/1s="sreread_config_32"7"writ.c#L200" id="L2t_writass=,9read_config_32"u8#L215" idapidio/8rom 9read_config_32"hopcounv#L215" idapidiohopcounvret = 0;
RIO63OST_D> 235                if ((host_deviceid);
a>);
host_deviceid);
a>);
result &am63ass="" id="L219" class="line" name="L219"> 6rrintkhpa>( id="_getpefbio/rio-scan.c#L216" id="_getpefbme="L2="lin24:L200"     -&6t lock on vid %4.4x 6id ?lass=  struct r6ev->dwhile);
 235                if ((ret<6a> = -EINVAL;name="L244"> 24a16" id="_/rapidio/rio-scan.c#L224" id="L22 id="_/rapidio/rio-s="L224"> 224                        if (( 2641ble master */>>>>>>>>>>>>>>>>>>>>>>>>>a>);
portsultidio/rio-scan.c#esult   s)   struct ,6n.c#L241" id="L241" clas6="lin64sref">net_list) {a>);
 224    r>sultidio/rio-scan.c#esult   s)   struct ,um 224    r>sultidio/rio-scan.c#esult   s ==)dev;
->-&6ig_32(rdev,,,,,24"> 224    r>sultidio/rio-scan.c#esult   s ==)dev;
->RI64PORT_GEN_CTL_CSR,,,,,24"> 224    r>sultidio/rio-scan.c#esult   s ==)dev;
->ret = 0;
result);/a>,
R64name="L176"> 176}
vid" 6id" c64;4.4x\n",
 id="_getpefbio/rio-scan.c#L216" id="_getpefbme="L2="lin24:L200"                     if ((r6f="+code=destid_table" c6ass="64lass="sref">did); hrefOCK_CSR,n",
EINsref">did));
idta6->did));
net_lisum);
did));
,r="sref">port 224                        if ((65">host_deviceid);K_CSR,n",
-> 224    s    ->result);/a>,
portsultidio/rio-scan.c#esult   s)   struct -> 176}
r 174
sultidio/rio-scan.c#esult   s =class
r6.c#L158" id="L158" class6"line65lass=sref">did));
ret = 0;
idta6 name="L160"> 160
,6- Get the base/extended 6evice66n ID of device
 * 6port:66OST_Dof device
 * @destid: De6tinat66 to bof device
 * @hopcou6t: Ho66PORT_of device
 165
6* 8/166;4.4xof device
r6 name="L168"> 168u8 idta6.c#L170" id="L170" class6"line671ble static ints/rapidio/rio-scan.c#L213" id="L213" c6oevice_id62  214mapidio/rio-scan.c#L216"mrio_locae*="> 224         224    u.c#L215" idapidio/1s="sreread_config_32"7"writ.c#L200" id="L2t_writass=,9read_config_32"u8#L215" idapidio/8rom 9read_config_32"hopcounv#L215" idapidiohopcounvdid));
host_deviceid);
a>);
 6o the bas6.c#L176" id="L176" class6"line67ass="sref">hpardev;
 224                        if ((r6 name="L178"> 178did);a>,n",
hpa>( 224        idta6span class="comment"> * 6port:681ble master */>>>>>>>>>>>>>>>>>
portsultidio/rio-scan.c#esult   s)   struct  * @destid: De6tinat68ce id  struct 6ass="comment"> * @hopcou6t: Ho68OST_DID_LOCK_while);
sultidio/rio-scan.c#esult   s !39read_config_32"     235                if (( * @did: Device 6D val68lass="sref">rdev,um);
 235                if (( 184,,,,,Rresult);CSR,,,,,R 186;
u16 did));
 158}
EINVAL;nsys6size, /
net_list) {a>);
6n.c#L192" id="L192" clas6="lin69OST_DID_LOCK_CSR,r 193rdev,dev;
 224        ,,,,,R * 6port:69s="sref">result);/a>,
 * @did: Device 6D val69_PORT_GEN_MASTER;
 197,
 224        did);a>,n&quoread_config_32"hopcounv#L215" idapidiohopcounv 199EINVAL;"sref">d
portsultidio/rio-scan.c#esult   s)   struct did));
-&7t;-&7tname="L193"> 193did));
 204}
 * 7="lin70s="srof device
-&7tmment"> * @did: Device 7n cla70_PORTof device
-&7t name="L197"> 197
-&7tes the base/extended de7RIO n70name=r 209-&7turns 0 on success or M-EI71OST_Dof device
-&7 name="L213"> 213-&7io_net * 214mapidio/rio-scan.c#L216"mrio_locae*="> 224         224    u.c#L215" idapidio/1s="sreread_config_32"7"writ.c#L200" id="L2t_writass=,9read_config_32"u8#L215" idapidio/8rom 9read_config_32"hopcounv#L215" idapidiohopcounv-&7.c#L215" id="L215" class7"line71s="sr> 235                if ((hpa>(a>);
-&7_dev * dd   7    int hpa>( 224        /* Release h7st de72sref">net_list) {{{{{{{{{{{{{{ef">d
-&7DID_LOCK_CSR" class="sre7">RIO72OST_DID_LOCK_CSR,
, read_config_32"    -&7+code=host_deviceid" cla7s="sr72">host_deviceid);
 224        -&7&,
portsultidio/rio-scan.c#esult   s)   struct result &am72ass="sref">stum);
sultidio/rio-scan.c#esult   s  class0xffffe !390xffffe > 235                if ((;aead_config_32" r_d bugidio/rio-scan.c r_d bug="L224s/rapidio/rio-scan.c#L237" id="badness whenl#eleascan " clasllock,%x:%x       -&7lock on master port, res7lt H4.4x\n",STER;aead_config_32"7"writ.c#L200" id="L2t_writass=,9read_config_32"hopcounv#L215" idapidiohopcounvdid); 174ret<7a> = -EINsref">did));
did));
net_lis 174RIO73OST_Dsref">did));

result &am73s="srof device
-&7(
-&7t lock on vid %4.4x 7id I4.4xof device
->ret<7a> = - 274IO master port

-&7ig_32(
RI74PORT_of device
-&7ORT_GEN_MASTER" class="s7ef">R74_PORTof device
-&7stid" class="sref">vid" 7id" c74;4.4xof device
r7f="+code=destid_table" c7ass="74name=ridta7-> 224    "L22#oute_add_ 214rapidio/rio-scan.c#L21lass="le*="> 224    rc#L244" id="L244" class="lls/rapidio/rio-scan.c#L213" id="L213" c7r2s="line7max, net_list) {{{{{="> 224    u.c#L215" idapidio/1s="sreread_config_32"tablsidio/rio-scan.ctablsass=l_="> 224    u.c#L215" idapidio/1s="sreread_config_32"#oute_t_writ244" id="L244" coute_t_writass=,9read_config_32"u8#L215" idapidio/8rom 9read_config_32"#oute_rio_244" id="L244" coute_rio_local_int9read_config_32"lock244" id="L244" lock->75">host_deviceint9read_config_32"rc244" id="L244" cc   s   struct  204}
stum);
 235                if ((;aead_config_32"rc244" id="L244" cc   s239read_config_32"lock_d clascan.c#L224" id="L22lock_d clas="L22="> 224    rc#L244" id="L244" class="ls="line" name="L238"netidio/rio-scan.cnetref"s="line" name="L238"hrio_244" id="L244" hrio_local_read_config_32"acan.c#L238" id="L238" class="line" name="L238"c"writ.c#L200" id="L2t_writass=ls/rapidio/rio-scan.c#L213" id="L213" c7r8t-&76),STER;_MASTER;aead_config_32"rcan.c#L238" id="L238" class="line" name="L238"hopcounv#L215" idapidiohopcounvr7.c#L158" id="L158" class7"line75lass="sref">did);um);
EINVAL;"sref">d 174
idta7 name="L160"> 160did));
 * 7port:76OST_DID_LOCK_name="L244"> 24rc244" id="L244" cc   s239read_config_32" 224    rc#L244" id="L244" class="ls="line" name="L238"netidio/rio-scan.cnetref"s="line" name="L238"hrio_244" id="L244" hrio_local_read_config_32"acan.c#L238" id="L238" class="line" name="L238"c"writ.c#L200" id="L2t_writass=ls/rapidio/rio-scan.c#L213"o_dev" class7iread_con7"comment"> * @destid: De7tinat76">host_deviceid);K_CSR,n" * @hopcou7t: Ho76PORT_GEN_CTL_CSR,,,,,R,n" 165stum);
;aead_config_32"r16"unlock_d clascan.c#L224" id="L22unlock_d clas="L22="> 224    rc#L244" id="L244" class="ls="line" name="L238"netidio/rio-scan.cnetref"s="line" name="L238"hrio_244" id="L244" hrio_local_read_config_32"acan.c#L238" id="L238" class="line" name="L238"c"writ.c#L200" id="L2t_writass=ls/rapidio/rio-scan.c#L213"o_dev" class7l8t-&7a>7* 8/176;4.4x\n",STER;_MASTERr7 name="L168"> 168 158}
u8 EIN 174
idta7.c#L170" id="L170" class7"line771ble sref">did));
7n.c#L172" id="L172" clas7="lin77OST_Dof device


r7 name="L178"> 178idta7span class="comment"> * 7port:78IO master port
 * @destid: De7tinat78n ID of device
7ass="comment"> * @hopcou7t: Ho78OST_Dof device
 * @did: Device 7D val78 to bof device
 184

 186
u16  224    "L22#oute_getpea rycan.c#L224" id="L22#oute_getpea ry="L22line" name="L214"> 214rapidio/rio-scan.c#L21lass="le*="> 224    rc#L244" id="L244" class="ll{="> 224    u.c#L215" idapidio/1s="sreread_config_32"tablsidio/rio-scan.ctablsass=ls/rapidio/rio-scan.c#L213" id="L213" c7, EINVAL;ERsys7size,  235                if ((net_lisint9read_config_32"rc244" id="L244" cc   s   struct 7n.c#L192" id="L192" clas7="lin79OST_D  struct  193rum);
 235                if ((lock_d clascan.c#L224" id="L22lock_d clas="L22="> 224    rc#L244" id="L244" class="ls="line" name="L238"netidio/rio-scan.cnetref"s="line" name="L238"hrio_244" id="L244" hrio_local_read_config_32"acan.c#L238" id="L238" class="line" name="L238"c"writ.c#L200" id="L2t_writass=ls/rapidio/rio-scan.c#L213"o_dev" class7sass="lin7span class="comment"> * 7port:79s="sref">result);/a>,
;_MASTER * @did: Device 7D val79_PORT_GEN_MASTER;um);
 197,ref">EIN 174
dsref">did));
 199ret = 0;
,  24rc244" id="L244" cc   s239read_config_32" 224    rc#L244" id="L244" class="ls="line" name="L238"netidio/rio-scan.cnetref"s="line" name="L238"hrio_244" id="L244" hrio_local_read_config_32"acan.c#L238" id="L238" class="line" name="L238"c"writ.c#L200" id="L2t_writass=ls/rapidio/rio-scan.c#L213"drivers/rapi8a2s="line8 c#L191" id="L191" class8"line80sref">net_list) {{{{{{{{{{{{{{ef">dER-&8t;,
, ER-&8tname="L193"> 193rum);
-&8t - Set the base/extende8"line80PORT_GEN_CTL_CSR,aead_config_32"r16"unlock_d clascan.c#L224" id="L22unlock_d clas="L22="> 224    rc#L244" id="L244" class="ls="line" name="L238"netidio/rio-scan.cnetref"s="line" name="L238"hrio_244" id="L244" hrio_local_read_config_32"acan.c#L238" id="L238" class="line" name="L238"c"writ.c#L200" id="L2t_writass=ls/rapidio/rio-scan.c#L213"drivers/rapi8a6t-&8tpan class="comment"> * 8="lin80s="sref">result);/a>,
;_MASTEaead_config_32"rcan.c#L238" id="L238" class="line" name="L238"hopcounv#L215" idapidiohopcounv-&8tmment"> * @did: Device 8n cla80name="L176"> 176}
 197r 174
-&8tes the base/extended de8RIO n80lass=sref">did));
 209ret = 0;

-&8turns 0 on success or W-EI81OST_Dof device
-&8 name="L213"> 213
-&8io_net *-&8.c#L215" id="L215" class8"line81s="srof device
-&8/a>->
-&8_dev *
  214mapidio/rio-scan.c#L216"mrio_locae*="> 224         224    u8#L215" idapidio/8rom 9read_config_32"hopcounv#L215" idapidiohopcounv   8    int  24u-scan.c#L224" id=u3sref">a>);
/* Release h8st de82ce id  struct -&8DID_LOCK_CSR" class="sre8">RIO82OST_DID_LOCK_name="L244"> 24r16" id="_/rapidio/rio-scan.c#L224" id="L22 id="_/rapidio/rio-s="L224"> 224        -> 224        read_config_32"hopcounv#L215" idapidiohopcounv-&8+code=host_deviceid" cla8s="sr82">host_devicet);/a>,
;_MASTEaead_config_32" |= HOST_DID_LOCK_rdev->portsultidio/rio-scan.c#esult   s)   struct -&8& 204}
result &am82ass="sref">st 174 224    u.c#L215" idapidio/1s="sr));
sultidio/rio-scan.c#esult   s  class0xffffe   struct -&8(did));
ret<8a> = -
-&8DID_LOCK_CSR" class="sre8">RIO83OST_Dof device
-&8+code=host_deviceid" cla8s="sr83 to bof device

result &am83s="srof device
-&8(
-&8t lock on vid %4.4x 8id S4.4xof device
->ret<8a> = - 214netidio/rio-scan.cnetlocae*="> 224    netidio/rio-scan.cnetref", line" name="L214"> 214mapidio/rio-scan.c#L216"mrio_locae*="> 224         2841ble master */>>>>>>>>>="> 224    u8#L215" idapidio/8rom 9read_config_32"hopcounv#L215" idapidiohopcounv 214rapidio/rio-scan.c#L21lass="le*="> 224    pras 214rapidio/rio-scan.c#L21lass="le*="> 224    rc#L244" id="L244" class="l   struct -&8ig_32(host_deviceid);
a>);
RI84PORT_GEN_CTL_int9read_config_32"tmpidio/rio-scan.ctmps="l   struct  807t-&8ORT_GEN_MASTER" class="s8ef">R84_PORT_GEN_MASum);
 224         808t-&8stid" class="sref">vid" 8id" c84;4.4x\n",ref">EINread_config_32" |= ANY_DESTIDv-> 224        read_config_32"hopcounv#L215" idapidiohopcounv 235                if ((r8f="+code=destid_table" c8ass="84lass="sref">did);aead_config_32"pr_d bugidio/rio-scan.c r_d bug="L224s/rapidio/rio-scan.c#L237" id="t_clas access check,failed       EINVAL; 174did));
, -> 224         235                if ((85">host_devicet);/aead_config_32"pr_d bugidio/rio-scan.c r_d bug="L224s/rapidio/rio-scan.c#L237" id="PE al/rapy disco   ed by-this host       ->-&8->
-&86)
r8.c#L158" id="L158" class8"line85lass="sref">did);name="L244"> 24r16" id="_/rapidio/rio-scan.c#L224" id="L22 id="_/rapidio/rio-s="L224"> 224        -> 224        EINVAL;"sref">did);name="L244"> 24hopcounv#L215" idapidiohopcounvportgvalidio/rio-scan.c#egvals="le   struct idta8 name="L160"> 160did));
net_list) {um);
 235                if (( * 8port:86OST_DID_LOCK_CSR,
getpan>ptagidio/rio-scan.cgetpan>ptag="L22/a>);
 * @destid: De8tinat86 to b  struct  * @hopcou8t: Ho86PORT_GEN_CTL_CSR,,,,,R);
 224     ras 235                if (( 165result);/a>,
;_MASaead_config_32"pr_d bugidio/rio-scan.c r_d bug="L224s/rapidio/rio-scan.c#L237" id=" edundan_ pethrio-%s       ;ult);/a>,
;_MASaead_config_32"nd fidio/rio-scan.cnd f="L224"> 224    ac#L244" id="L244" class="l)e   struct -&8a>8* 8/186;4.4x\n",STER;_MASTER4"> 224     rasr8 name="L168"> 168did);a>,n&quosref">did));
u8 EINVAL;sref">did));
idta8.c#L170" id="L170" class8"line87IO maref">did));
net_list) { 1748n.c#L172" id="L172" clas8="lin87OST_DID_LOCK_sref">did));
ptlio-acquirs " clasllock,*="drivers/rapidio/rio-scan.c#L213" id="L213" c8rass="lin8/a>, resuname="L244"> 24r16" id="_/rapidio/rio-scan.c#L222" id="L222 id="_/rapidio/rio-sc="L224"> 224        -> 224        ;ult);/a>,
->r8 name="L178"> 178dwhile);
getphost_d clasit2lockcan.c#L224" id="L22getphost_d clasit2lock="L224"> 224        EINVAL<ssref="drivers/rap    235                if ((idta8span class="comment"> * 8port:881ble master */d * @destid: De8tinat88sref">net_list) {ne" name="L238"mdelay.c#L200" id="L2mdelay="L221)   struct 8ass="comment"> * @hopcou8t: Ho88OST_DID_LOCK_CSR,d * @did: Device 8D val88">host_devicet);/aead_config_32"r16" id="_/rapidio/rio-scan.c#L222" id="L222 id="_/rapidio/rio-sc="L224"> 224        -> 224         184,,,,,R,n");/aead_config_32"hopcounv#L215" idapidiohopcounvresult);/a>,
;_MASTER);/aead_config_32" |= HOST_DID_LOCK_rdev-> 186;ult);/a>,
;_MAS9read_config_32"    u16 did));
 158}
EINum);
 224         235                if ((sys8size, dead_config_32"pr_d bugidio/rio-scan.c r_d bug="L22 235                if ((net_list) {{{{{=s/rapidio/rio-scan.c#L237" id="PE locked by-358n.c#L192" id="L192" clas8="lin89OST_DID_LOCK_CSR, 174 193rsref">did));
 204}
 * 8port:89s="sref">resud * @did: Device 8D val89_PORT_GEN_MAS="> 224    rc#L244" id="L244" class="l239read_config_32"s174p_d clascan.c#L224" id="L22s174p_d clas="L224"> 224    netidio/rio-scan.cnetref", 4"> 224        -> 224         197,ref">EINmaster */dead_config_32"hopcounv#L215" idapidiohopcounvdum);
 235                if (( 199EINVAL;ddead_config_32"list_add_tailidio/rio-scan.clist_add_tail="L22 class="sref">portportnet_list) {s="sref">port,um);
 224     ras 193host_devicet);/t) {s="sref">port * 9="lin90s="sref">result); 174-&9tmment"> * @did: Device 9n cla90name="L176"> 176}
 197rum);
 224    ac#L244" id="L244" class="l)e"> 235                if ((did);unt9read_config_32"sw_c"writ.c#L200" id="L2sw_c"writclas   struct  209EINVAL;unt9read_config_32"cur_c"writ.c#L200" id="L2cur_c"writclas   struct net_list) {s="sref">port 213-&9io_net *-> 224    ac#L244" id="L244" class="ls="line" name="L238"swpinfo-&9.c#L215" id="L215" class9"line91s="sref">result);a>);
 224    ac#L244" id="L244" class="ll_read_config_32" |= GLOBAL_TABLEv->-&9/a>->;ult);/a>,
ref="drivers/rap   -&9_dev *,4"> 224    ac#L244" id="L244" class="ls="line" name="L238"#s clchidio/rio-scan.c#s clchass=s="line" name="L238"#oute_tablsidio/rio-scan.c#oute_tablsass=[aead_config_32"p   -&92  158}
EINVAL;dead_config_32"c"writ.c#L200" id="L2t_writass=239read_config_32"t_writ_firstidio/rio-scan.ct_writ_first="L224"> 224    netidio/rio-scan.cnetref"e   struct -> 235                if ((/* Release h9st de92sref">net_list) {{{{{{{{{um);
 235                if ((RIO92OST_DID_LOCK_CSR,
a>);
 224    ac#L244" id="L244" class="ll_read_config_32" |= GLOBAL_TABLEv->-&9+code=host_deviceid" cla9s="sr92">host_devicet);/a>,
;_MASTEa>,
a>);
-&9&,,,,,R,n"4"> 224    ac#L244" id="L244" class="ls="line" name="L238"#s clchidio/rio-scan.c#s clchass=s="line" name="L238"#oute_tablsidio/rio-scan.c#oute_tablsass=[aead_config_32"c"writ.c#L200" id="L2t_writass=]239read_config_32"sw_inrio_result &am92s="sref">result);/a>,
did));
;ult)dead_config_32"c"writ.c#L200" id="L2t_writass=239read_config_32"t_writ_nextidio/rio-scan.ct_writ_next="L224"> 224    netidio/rio-scan.cnetref", 4"> 224    c"writ.c#L200" id="L2t_writass=2+91e   struct -&9lock on master port, res9lt \4.4x\n",sref">did));
did);aead_config_32"pr_d bugidio/rio-scan.c r_d bug="L22ref">did));
ret<9a> = -EINVAL;ERnd fidio/rio-scan.cnd f="L224"> 224    ac#L244" id="L244" class="l)l_read_config_32"acan.c#L238" id="L238" class="line" name="L238"vit.c#L200" id="L2vitass=,9read_config_32"#can.c#L238" id="L238" class="line" name="L238"cit.c#L200" id="L2titass=ls/rapidio/rio-scan.c#L213"drivers/rapi9r2s="line9net_list) {{{{{=ead_config_32" |= GET_TOTAL_PORTSv-> 224    ac#L244" id="L244" class="ls="line" name="L238"swpinfo-&9DID_LOCK_CSR" class="sre9">RIO93OST_DID_LOCK_CSR,dead_config_32"sw_c"writ.c#L200" id="L2sw_c"writclas239read_config_32"next_c"writ.c#L200" id="L2next_c"writs="l   struct -&9+code=host_deviceid" cla9s="sr93">host_devicet);/for);
,,,,,Ra>);
-> 224    ac#L244" id="L244" class="ls="line" name="L238"swpinforesult &am93s="sref">result);/a>,
a>);
 235                if ((;ult)um);
 235                if (( 224    rL22enabls_rx_tx_rio_244" id="L244" cL22enabls_rx_tx_rio_="L224"> 224        -&9ev->did);a>,n&quospan>,STER;_MASTER4"> 224     |= ANY_DESTIDv-> 224        ret<9a> = -EINVAL;"sref">did);ER;_MASTER4"> 224    hopcounv#L215" idapidiohopcounv 2941ble master */>>>>>>>>>_MASTER4"> 224    rc#L244" id="L244" class="ls="line" name="L238"#s clchidio/rio-scan.c#s clchass=s="line" name="L238"rio__okcan.c#L224" id=rio__okble m|= (12<s<ssref="drivers/rap   _numnet_list) {{{{{{{{{{{{{{ef"continue   struct -&9Mark device as discovere9 and 94OST_DID_LOCK_CSR,
did));
RI94PORT_GEN_CTL_CSR,,,,,R 907t-&9ORT_GEN_MASTER" class="s9ef">R94_PORT_GEN_MASTER;ult)um);
 908t-&9stid" class="sref">vid" 9id" c94;4.4x\n",ref">EINNNNN24"> 224        -> 224        r9f="+code=destid_table" c9ass="94lass="sref">did);,,,,,R 235                if ((EINVAL;>);,,,,,Rdid));
->>>>>>>>>>_MASTERRnet_list) {{{{{{{{{{{{{{ef">dERref="drivers/rap   _num-> 224        95">host_devicet);/_LOCK_CSR,
a>);
 224        ->result);/a>,
;_MASaead_config_32"rc#L244" id="L244" class="ls="line" name="L238"#s clchidio/rio-scan.c#s clchass=s="line" name="L238"rio__okcan.c#L224" id=rio__okble m|= (12<s<ssref="drivers/rap   _num-&9->;ult);/a>,
);
 224    ac#L244" id="L244" class="ll_read_config_32" |= GLOBAL_TABLEv->-&96),ref">EINmaster */;/a>,
);
 224        r9.c#L158" id="L158" class9"line95lass="sref">did);ref">EINmaster */;/a>,
);
ret = 0;
idta9 name="L160"> 160>>>>>>>>>_MASTERum);
 224    netidio/rio-scan.cnetref", 4"> 224        ,9- Get the base/extended 9evice96sref">net_list) {);ref">EINmaster */;/a>,
);
 * 9port:96OST_DID_LOCK_CSR,
 * @destid: De9tinat96 to b  struct  * @hopcou9t: Ho96PORT_GEN_CTL_CSR,,,,,R,
 165result);/a>,
;_MASaead_config_32"c"writ.c#L200" id="L2t_writass=239read_config_32"t_writ_nextidio/rio-scan.ct_writ_next="L224"> 224    netidio/rio-scan.cnetref", 4"> 224    cur_c"writ.c#L200" id="L2cur_c"writclas2+91e   struct ;ult);/a>,
);
-> 235                if ((9* 8/196;4.4x\n",STER;_MASTERRRRRRRRRfor);
r9 name="L168"> 168did);a>,n&quo/a>);/a>,
;_MASaead_config_32"c"writ.c#L200" id="L2t_writass=2<ssref="drivers/ranext_c"writ.c#L200" id="L2next_c"writs="l;)"> 235                if ((u8 EINVAL;_GEN_MASTER;ult);/a>,
);
 235                if ((idta9.c#L170" id="L170" class9"line971ble master */>>>>>>>>>_MASTERR);/a>,
;_MASaead_config_32"aL22#oute_add_ 224    ac#L244" id="L244" class="ll 235                if ((net_list) {er */>>>>>>>>>_MASTERR);/a>,
;_MASaead_config_32" |= GLOBAL_TABLEv->9n.c#L172" id="L172" clas9="lin97OST_DID_LOCK_CSR,
);/a>,
;_MASaead_config_32"c"writ.c#L200" id="L2t_writass=l  struct host_devicet);/a>,
;_MASTEa>,
/a>,
;_MASaead_config_32"p   _numresult);/a>,
;_MAS_CSR/a>,
;_MASaead_config_32"rc#L244" id="L244" class="ls="line" name="L238"#s clchidio/rio-scan.c#s clchass=s="li  struct ;ult);/a>,
;_MAS_CSR/a>,
;_MASaead_config_32"route_tablsidio/rio-scan.c#oute_tablsass=[aead_config_32"c"writ.c#L200" id="L2t_writass=]23  struct -&9n.c#L177" id="L177" clas9="lin97;4.4x\n",STER;_MASTER;_MAS_CSR/a>,
;_MASaead_config_32"pd="_numr9 name="L178"> 178did);ref">EINmaster */;/a>,
did));
EINVALR;_MAS_CSR/a>,
;_MASaead_config_32"c"writ.c#L200" id="L2t_writass=239read_config_32"t_writ_nextidio/rio-scan.ct_writ_next="L224"> 224    netidio/rio-scan.cnetref",ref">did));
idta9span class="comment"> * 9port:981ble master */ref">EINVALR;_MAS_CSR/a>,
;_MASaead_config_32"c"writ.c#L200" id="L2t_writass=2+91e   struct  * @destid: De9tinat98sref">net_list) {{{{{{{{{{{{{{{{{{{{{{{{{sref">did));
 * @hopcou9t: Ho98OST_DID_LOCK_CSR,{{{{{{{{{{{{{{{{sref">did));
 * @did: Device 9D val98">host_devicet);/{{{{{{{{s else"> 235                if (( 184,,,,,R,n"a
 186
u16 r9.c#L188" id="L188" class9"line98lass="sref">did);ref">EINmaster */a>);
 224    ac#L244" id="L244" class="ll_read_config_32"p   _num, ret = 0;
sys9size, master */a>);
net_list) {{{{{{{{{sref">did));
did));
 193,a * 9port:99s="sref">result);um 224    ac#L244" id="L244" class="ls="line" name="L238"src_opscan.c#L224" id=src_opsble m clasSaead_config_32" |= SRC_OPS_PORT_WRITEv-> * @did: Device 9D val99_PORT_GEN_MASTER;ult);
 235                if (( 197,ref">EINa>);
 224    ac#L244" id="L244" class="ll 235                if ((did);ref">EINmaster */a>);
->                if ((10asass="sref">did);ref">EINmaster */24"> 224        235                if ((, EINVALR;_MAS24"> 224        10asref">net_list) {sref">did));
10a3to b  struct  19310a">host_devicet);/aead_config_32"r16"init_em 224    ac#L244" id="L244" class="le   struct  204}
 * 10apa>10as="sref">result);a * @did: Device 10amm>10a_PORT_GEN_MASTER;um);
 19710a;4.4x\n",ref">EINa>);
t_writ_allocidio/rio-scan.ct_writ_alloc="L224"> 224    netidio/rio-scan.cnetref"e   struct  158}
 20910" >host_devicet);/aead_config_32"rcan.c#L238" id="L238" class="line" name="L238"c"writ.c#L200" id="L2t_writass=239read_config_32"sw_c"writ.c#L200" id="L2sw_c"writclas   struct net_list) {s="sref">port,{{{{read_config_32"nd fidio/rio-scan.cnd f="L224"> 224    ac#L244" id="L244" class="l)l_read_config_32"acan.c#L238" id="L238" class="line" name="L238"vit.c#L200" id="L2vitass=,9read_config_32"#can.c#L238" id="L238" class="line" name="L238"cit.c#L200" id="L2titass=e   struct  21310" to b  struct 10"PORT_GEN_CTL_ 17410"s="srsref">did));
-> 176}
10"8PORTof device
10"9PORTof device
plete- T"wrs;umplete"drivers/rapidio/rio-scan.c#L213" id="L213" c102ss="line10    int 10 1PORTof device
/* Release h10s=">10 2PORTof device
10 4PORTof device
plete."drivers/rapidio/rio-scan.c#L213" id="L213" c1025s="line10&result10 s="srstatic,untEaead_config_32""L22enum_an>pleteidio/rio-scan.cenum_an>plete="L22o-suctEaead_config_32""L22mrio_244" id="L244" cL22mrio_clas2*4"> 224        10 name=> 235                if ((10 ;4.4x\n"4"> 224    uscan.c#L222" id="u3sref">aead_config_32""egval244" id="L244" cegvalclas   struct 10 name="L158"> 158}
 = - 224    cL22local_readdio/rio-scan.c#L222" id="L222local_readdio/rio-sc="L224"> 224        ->                if ((10a1ble master */ref">EINVALR< class="sref">port10a2ORT_GEN_CTL_ 174 224    aegval244" id="L244" cegvalclasm clasSaead_config_32" |= PORT_GEN_DISCOVEREDv->did));
10a to b  struct 10a5PORTof device
result10as="srof device
10a_PORTof device
10a9PORTof device
 >10a>PORTof device
10a1PORTof device
10a2PORTof device
10a4PORTof device
10as="srof device
vid" 10sti>10a8PORToead_config_32"tisc_peeridio/rio-scan.ctisc_peer="L22o-suctEaead_config_32""L22netidio/rio-scan.c"L22netclas2*4"> 224    netidio/rio-scan.cnetref", o-suctEaead_config_32""L22mrio_244" id="L244" cL22mrio_clas2*4"> 224        didread_config_32"u8#L215" idapidio/8="sreread_config_32"hopcounv#L215" idapidiohopcounv 224     ras10n.ame=> 235                if ((->10n2ORT_GEN_CTL_o-suctEaead_config_32""L22can.c#L238" id="L23L22d" clas2*4"> 224    10n3ble master *read_config_32"u.c#L215" idapidio/1s="sreread_config_32"nc"writ.c#L200" id="L2nc"writclas   struct >10ns="sref">resuum 224    ac#L244" id="L244" class="l239read_config_32"s174p_d clascan.c#L224" id="L22s174p_d clas="L224"> 224    netidio/rio-scan.cnetref", 4"> 224         235                if ((->10n;4.4x\n",4"> 224    list_add_tailidio/rio-scan.clist_add_tail="L22 class="sref">portport10nlass="sref">did);aead_config_32"ac#L244" id="L244" class="ls="line" name="L238"pras10n.PORT_GEN_MASTER;um);
 224     ras 16010n1ble master */ref">EIN4"> 224     ras * 10spa>10nOST_DID_LOCK_CSR, 174 * @destid: De10"co>10n to b  struct  * @hopcou10ass>10n5="sref">resuumis_s clchidio/rio-scan.c#/a>is_s clch="L224"> 224    ac#L244" id="L244" class="l)e"> 235                if (( 16510ns="sref">result);a10a><>10n8to b  struct  16810nlass="sref">did);aead_config_32"pr_d bugidio/rio-scan.c r_d bug="L22ref">did));
 1s="line10.c#L170" id="L170" class10.c#>10>1ble master */>>>>read_config_32"nd fidio/rio-scan.cnd f="L224"> 224    ac#L244" id="L244" class="l)l_read_config_32"acan.c#L238" id="L238" class="line" name="L238"vit.c#L200" id="L2vitass=,9read_config_32"#can.c#L238" id="L238" class="line" name="L238"cit.c#L200" id="L2titass=<  struct 2s="line102 net_list) {{{{{=ead_config_32" |= GET_TOTAL_PORTSv-> 224    ac#L244" id="L244" class="ls="line" name="L238"swpinfo3s="line10n.c#L172" id="L172" clas10n.c>10>OST_DID_LOCK_CSR,for);
4s="line10&host_devicet);/{{{{{a>);
-> 224    ac#L244" id="L244" class="ls="line" name="L238"swpinfo5s="line10n.c#L174" id="L174" clas10n.c>10>PORT_GEN_CTL_CSR,,,,,Ra>);
 235                if ((, result);/a>,
-> 224    ac#L244" id="L244" class="ls="line" name="L238"swpinfo7s="line10.c#L176" id="L176" class10.c#>10>_PORT_GEN_MASTER;ult);/a>,
8s="line10n.c#L177" id="L177" clas10n.c>10>8to b  struct  17810>lass="sref">did);ref">EINum);
 108ss="line10- Set the base/extended 10- S>10- PORT_GEN_MASTER;ult);/a>24"> 224         235                if (( * 10spa>10-1ble master */master */a>);
did));
 * @destid: De10"co>10-sref">net_list) {{{{{{{{{{{{{{ef">dERrs/rapidio/rio-scan.c#L237" id="rs/rncan " clasl=" pio_ %p        * @hopcou10ass>10-OST_DID_LOCK_CSR,
 * @did: Device 10omm>10- to b  struct  18410-PORT_GEN_CTL_CSR,,,,,R,n"4"> 224    a222lock_d clascan.c#L224" id="L22lock_d clas="L224"> 224         10-7s="line10 name="L186"> 18610-_PORT_GEN_MASTER;ult);/a>,
);
u16 10-;4.4x\n",STER;_MASTER;_a>);
 224        10-lass="sref">did);ref">EINmaster */);
 235                if ((10reass="sref">did);ref">EINmaster */);
 224    ac#L244" id="L244" class="l<  struct 10r1ble master */ref">EINVALR;_MAS_CSR/a>,
;ref="drivers/raef="GLOBAL_TABLEv->10rsref">net_list) {er */>>>>>>>>>_MASTERR);/a>,
);
10rOST_DID_LOCK_CSR,
);/a>,
port 19310r">host_devicet);/a>,
;_MASTEa>,
);
 * 10spa>10rs="sref">result);/a>,
;_MASsref">did));
 * @did: Device 10omm>10rname="L176"> 176}
 19710r;4.4x\n",STER;_MASTERum);
-> 224                        if ((10rlass="sref">did);ref">EINmaster */continue   struct did);ref">EINmaster *a>);
 224        11a1ble master */ref">EINVALRum);
tisc_peer="L224"> 224    netidio/rio-scan.cnetref", 4"> 224        11asref">net_list) {id);ref">EINmaster *a>);
);
110OST_DID_LOCK_CSR,
 19311a">host_devicet);/////////sref">did));
110PORT_GEN_CTL_CSR,sref">did));
 * 11apa>11as="sref">resu} else  struct  * @did: Device 11amm>11a_PORT_GEN_MASTER;a>);
 19711a;4.4x\n",ref"read_config_32"nd fidio/rio-scan.cnd f="L224"> 224    ac#L244" id="L244" class="l)l_read_config_32"acan.c#L238" id="L238" class="line" name="L238"vit.c#L200" id="L2vitass=,9read_config_32"#can.c#L238" id="L238" class="line" name="L238"cit.c#L200" id="L2titass=e   struct  158}
 20911" >host_device 174did));
did));
 2131114PORTof device
 k is acmevsssrivers/rapidio/rio-scan.c#L213" id="L213" c1115s="line11io_net *111s="srof device
>111_PORTof device
11"8PORTof device
 k.  R17411"9PORTof device
11  PORTof device
11 1PORTof device
/* Release h11s=">11 2PORTstatic,untEaead_config_32""L22mrio__is_acmevsidio/rio-scan.cmrio__is_acmevs="L22o-suctEaead_config_32""L22mrio_244" id="L244" cL22mrio_clas2*4"> 224        112">host_device4"> 224    uscan.c#L222" id="u3sref">aead_config_32""esul_244" id="L244" cesul_clas2391   struct 1125>host_device4"> 224    uscan.c#L222" id="u3sref">aead_config_32"ext_ftr_ptrcan.c#L224" id=ext_ftr_ptrref"   struct result112s="sref">resuuntE*4"> 224    mrio__phys_tablsidio/rio-scan.c#/a>mrio__phys_tablsref"   struct 112name="L176"> 176}
11 ;4.4x\n"do"> 235                if ((did);um 224    ext_ftr_ptrcan.c#L224" id=ext_ftr_ptrref"23  struct  >113sass="sref">did);ref">read_config_32"mrio__get_featursidio/rio-scan.c#/a>mrio__get_featurs="L224"> 224         224    11a1ble master */ref">EINbreak   struct 1132ORT_GEN_CTL_} while (*++4"> 224    113">host_deviceum);
                if (( 224    a222local_readdio/rio-scan.c#L222" id="L222local_readdio/rio-sc="L224"> 224        result113s="sref">result);/a>,
;_MAS_CSR/4"> 224    ext_ftr_ptrcan.c#L224" id=ext_ftr_ptrref"2+ 235                if ((-> 224                        if ((113;4.4x\n",STER;_MASTER;_MAS_ class="sref">port113name="L158"> 158}
 = -->1141ble sref">did));
114sref"ref">did));
11a3PORTof device
11a4PORTof device
11as="srof device
enum: Enumeration/Disco-scy m_32 flag"drivers/rapidio/rio-scan.c#L213" id="L213" c1147s="line11ORT_GEN_MASTER" class="s11ORT>114_PORTof device
vid" 11sti>1148PORTof device
115 PORTof device
1151PORTof device
1152PORTof device
1153PORTof device
 224    <222alloc2netidio/rio-scan.c"L22alloc2net="L22o-suctEaead_config_32""L22mrio_244" id="L244" cL22mrio_clas2*4"> 224        enum.c#L200" id="L2ta>enumass=,9read_config_32"u.c#L215" idapidio/1s="sreread_config_32"stao_can.c#L224" id=stao_ref") 235                if ((-> 235                if ((-> 224    netidio/rio-scan.cnetref"   struct 1158to b  struct 11nlass="sref">d4"> 224    netidio/rio-scan.cnetref"239read_config_32"kzallocidio/rio-scan.ckzalloc="L22oizeof2o-suctEaead_config_32""L22netidio/rio-scan.c"L22netclas)l_read_config_32"GFP_KERNELidio/rio-scan.cGFP_KERNELclase   struct 11n.PORT_GEN_MASum);
 235                if (( 16011n1ble master */a>);
net_list) {id);read_config_32"BITS_TO_LONGSv-> 224    ef="MAX_ROUTE_ENTRIESv-> 224                        if (( * 11spa>11nOST_DID_LOCK_CSR,_GEN_MASoizeof2long)l 235                if (( * @destid: De11"co>116">host_devicet);/////////read_config_32"GFP_KERNELidio/rio-scan.cGFP_KERNELclase   struct  * @hopcou11ass>116name="L204"> 204}
 16511ns="sref">result);um);
 235                if ((11n_PORT_GEN_MASTER;////////read_config_32"pr_errcan.c#L224" id=pr_err="L224s/rapidio/rio-scan.c#L237" id="failed to allocate c"wrID tabls       11a><>116;4.4x\n",ref">EINa>);
 224    netidio/rio-scan.cnetref"e   struct  16811nlass="sref">did);ref">EINa>);
 <>11> ST_DID_LOCK_CSR,} else"> 235                if ((11>1ble master */>>>>>EINa>);
11>sref">net_list) {{{{{>EINa>);
3s="line11n.c#L172" id="L172" clas11n.c>11>OST_DID_LOCK_CSR,>net_list) {{{{{>EINa>);
-> 224        11>">host_devicet);/{{{{{EINa>);
port11>PORT_GEN_CTL_CSR,sref">did));
, resusref">did));
117name="L176"> 176}
117;4.4x\n"um);
 235                if (( 17811>lass="sref">did);a>);
port->port * 11spa>11-1ble master */a>);
port * @destid: De11"co>11-sref">net_list) {a>);
port * @hopcou11ass>11-OST_DID_LOCK_CSR,ne" name="L238"list_add_tailidio/rio-scan.clist_add_tail="L22 class="sref">portport * @did: Device 11omm>118">host_devicet);/s="sref">port 224         18411-PORT_GEN_CTL_CSR,s="sref">portresusref">did));
 18611-_PORT_GEN_MAS 174u16 11-;4.4xsref">did));
118name="L158"> 158}
119 PORTof device
1191PORTof device
1192PORTof device
1193PORTof device
 1931194PORTof device
 * 11spa>119s="srof device
 * @did: Device 11omm>119_PORTof device
 19711r;4.4xstatic,void*a>);
 224    netidio/rio-scan.cnetref") 235                if ((11rlass=> 235                if ((12asass="sref">do-suctEaead_config_32""L22can.c#L238" id="L23L22d" clas2*4"> 224     224    sw12a1ble master *o-suctEaead_config_32""L22s clchidio/rio-scan.c#/a>s clch="L22*4"> 224    12asref">net_lisread_config_32"u8#L215" idapidio/8="sreread_config_32"s    1203ble master *read_config_32"u.c#L215" idapidio/1s="sreread_config_32"c"writ.c#L200" id="L2t_writass=   struct  193120 to b  struct  224    list_for_each_ 224    port 235                if (( * 12apa>120ass="" id="L219" class="line" name="L219"> 12a7s="line12amment"> * @did: Device 12amm>12a_PORT_GEN_MASTER;a>);
 1971208to b  struct did);a>);
 224    port 235                if (( 20912" >hos 235                if ((1211ble master */>>>>>EINumis_s clchidio/rio-scan.c#/a>is_s clch="L224"> 224    ac#L244" id="L244" class="l)2 clas class24"> 224    ac#L244" id="L244" class="ls="line" name="L238"                if ((net_list) {id);ref">EINcontinue   struct  213121">host_devicet);/{{{{{EINum 235                if (( * 224    sw 224    121ass="" id="L219" class="line" name="L219"> 12"7s="line12/a>->121;4.4x\n",STER;_MASTERum);
121lass="sref">did);ref">EINmaster */continue   struct 122 >hos 235                if ((1221ble master */master */a>);
-> 224    sw/* Release h12s=">122sref"ref">did));
 235                if ((122">host_devicet);/{{{{{EINmaster */a>);
 224    sw                if ((result122s="sref">result);/a>,
;_MAS_CSR/R>;ref="drivers/ras    122_PORT_GEN_MASTER;ult);/a>,
;_MASread_config_32"did));
did);;_MASTERsref">did));
 = -did);sref">did));
12a1ble master *sref">did));
12sc="L2sref">did));
1234PORTof device
1235PORTof device
init_em - Initializes  id=Error Manage
result123s="srof device
123_PORTof device
1239PORTof device
 >124 PORTof device
1241ble static,void*a>);
 224                    if ((124sref"> 235                if ((124OST_DID_LOCK_umis_s clchidio/rio-scan.c#/a>is_s clch="L224"> 224    ac#L244" id="L244" class="l)2 clas class24"> 224    ac#L244" id="L244" class="ls="line" name="L238"em_efptrcan.c#L224" id=em_efptrs="l)2 clas clas 235                if (((host_devicet 224    ac#L244" id="L244" class="ls="line" name="L238" 235                if (( 224    ac#L244" id="L244" class="ls="line" name="L238" 224    ac#L244" id="L244" class="l)s 235                if ((resusref">did));
did));
vid" 12sti>1248to b  struct 125 PORTof device
pw_enabls - Enablss/disablss rio_-write handlcan by a master rio_"drivers/rapidio/rio-scan.c#L213" id="L213" c1251s="line12->1252PORTof device
1253PORTof device
pw_enabls="L22o-suctEaead_config_32""L22mrio_244" id="L244" cL22mrio_clas2*4"> 224        >1256ST_DID_LOCK_um125_PORT_GEN_MASTER;a>);
 224        125;4.4xsref">did));
125name="L158"> 158}
126 PORTof device
 1601261PORTof device
 * 12spa>1263PORTof device
 * @destid: De12"co>1264PORTof device
 * @hopcou12ass>1265PORTof device
 165126s="srof device
k, then stao_=recurso-s peer=enumeration. R17412a><>1268PORTof device
 16812nlass=untEaead_config_32"__d clni  224    mrio_244" id="L244" mrio_clas) 235                if (( 1s="line12.c#L170" id="L170" class12.c#>1271ble master *o-suctEaead_config_32""L22netidio/rio-scan.c"L22netclas2*4"> 224    netidio/rio-scan.cnetref"239read_config_32"NULLidio/rio-scan.cNULLass=   struct 12>sref">net_lisuntEaead_config_32""cidio/rio-scan.crcref"2391   struct 3s="line12n.c#L172" id="L172" clas12n.c>1273to b  struct 12>">host_device4"> 224     runtkidio/rio-scan.c runtk="L224"> 224    KERN_INFOidio/rio-scan.cKERN_INFOto b2as/rapidio/rio-scan.c#L237" id="enumerate master rio_ %d,-%s        224    mrio_244" id="L244" mrio_class="line" name="L238"it.c#L200" id="L2itass=l 235                if ((12>PORT_GEN_CTL_CSR4"> 224    mrio_244" id="L244" mrio_class="line" name="L238"4" cidio/rio-scan.cnams="L2)s 235                if ((, resud7s="line12.c#L176" id="L176" class12.c#>127_PORT_GEN_MASumenum2hostidio/rio-scan.cenum2host="L224"> 224    mrio_244" id="L244" mrio_clas)"<ss0)"> 235                if ((127;4.4x\n",4"> 224     runtkidio/rio-scan.c runtk="L224"> 224    KERN_INFOidio/rio-scan.cKERN_INFOto b 235                if (( 17812>lass="sref">did);f">resud 224    mrio_244" id="L244" mrio_class="line" name="L238"it.c#L200" id="L2itass=)s 235                if (( * 12spa>12-1ble master */a>);
);
 * @destid: De12"co>12-sref">net_list) {goto ne" name="L238"ou_244" id="L244" ou_ass=   struct  * @hopcou12ass>12-OST_DID_LOCK_sref">did));
 * @did: Device 12omm>128 to b  struct  18412-PORT_GEN_CTL_d k, allocate net and enum peerse*="drivers/rapidio/rio-scan.c#L213" id="L213" c1286s="line12tes the base/extended de12tes>1286ST_DID_LOCK_ummrio__is_acmevs="L224"> 224    mrio_244" id="L244" mrio_clas))"> 235                if (( 186128_PORT_GEN_MASTER;a>);
 224    mrio_244" id="L244" mrio_clasl_1, 0)s 235                if ((u16 128;4.4x\n",um);
 235                if ((128lass="sref">did);ref">EINa>);
 224    KERN_ERev->129 PORT_GEN_MASTER;CSR>a>);
);
1291ble master */master *goto ne" name="L238"ou_244" id="L244" ou_ass=   struct 129sref">net_list) {sref">did));
1293to b  struct  193129">host_devicet);/s 224    a222c"writ_reservs.c#L238" id="L23L22d"writ_reservs="L224"> 224    netidio/rio-scan.cnetref" 224    mrio_244" id="L244" mrio_class="line" name="L238"host_t_clasit.c#L200" id="L2host_t_clasitass=)s 235                if (( * 12spa>129ass="" id="L219" class="line" name="L219"> 1297s="line12omment"> * @did: Device 12omm>129_PORT_GEN_MASTER;a 197129;4.4x\n",4"> 224    enabls_rx_tx_rio_244" id="L244" cL22enabls_rx_tx_rio_="L224"> 224    mrio_244" id="L244" mrio_clasl_1, 0, 0, 0)s 235                if ((129name="L158"> 158}
130 PORT_GEN_MASTER;a1301ble master */a>);
 224    mrio_244" id="L244" mrio_clasl_4"> 224    ef="COMPONENT_TAG_rdev->130sref">net_list) {id);ref">EIN */a>);
                if ((1303to b  struct  193130">host_devicet);/s="sref">port 224    netidio/rio-scan.cnetref")s 235                if ((130name="L204"> 204}
 * 13apa>130s="sref">result);um);
 224    netidio/rio-scan.cnetref" 224    mrio_244" id="L244" mrio_clas, 0, read_config_32"NULLidio/rio-scan.cNULLass=, 0)"<ss0)"> 235                if (( * @did: Device 13amm>13a_PORT_GEN_MASTER;TER;a 197130;4.4x\n",ref">EINa>);
 224    KERN_INFOidio/rio-scan.cKERN_INFOto b 235                if ((130lass="sref">did);ER;TER;a 209131 PORT_GEN_MASTER;CSR>ef">EINa>);
clear2locksidio/rio-scan.c"L22clear2locks="L224"> 224    netidio/rio-scan.cnetref")s 235                if ((net_list) {id);a>);
);
 213131">host_devicet);/sref">did));
 *131s="sref">result);read_config_32"r222d"writ_fresidio/rio-scan.cr222d"writ_fres="L224"> 224    netidio/rio-scan.cnetref" 224    next_c"writ.c#L200" id="L2next_c"writref")s 235                if ((>131_PORT_GEN_MASTER;read_config_32"r222update2#oute_tablssidio/rio-scan.c"L22update2#oute_tablss="L224"> 224    netidio/rio-scan.cnetref")s 235                if ((131;4.4x\n",a>);
 224    netidio/rio-scan.cnetref")s 235                if ((131lass="sref">did);a>);
 224    mrio_244" id="L244" mrio_clasl_1)s 235                if (( 235                if ((1321ble master */4"> 224     runtkidio/rio-scan.c runtk="L224"> 224    KERN_INFOidio/rio-scan.cKERN_INFOto b2as/rapidio/rio-scan.c#L237" id="master rio_ %d "> k inacmevs       /* Release h13s=">132sref">net_list) {id)a>);
);
132">host_devicesref">did));
 204}
result132s="sref">rene" name="L238"ou_244" id="L244" ou_ass=:"L204"> 204}
did));
 158}
 = -1331PORTof device
1332PORTof device
1334PORTof device
1335PORTof device
result133s="srof device
133_PORTstatic,void*a>);
 224    netidio/rio-scan.cnetref") 235                if ((1338PORT> 235                if ((->do-suctEaead_config_32""L22s clchidio/rio-scan.c#/a>s clch="L22*4"> 224     >134sass="sref">do-suctEaead_config_32""L22can.c#L238" id="L23L22d" clas2*4"> 224    1341ble master *untEaead_config_32"i.c#L200" id="L2iclas   struct 134sref">net_lisread_config_32"u8#L215" idapidio/8="sreread_config_32"s    134">host_deviceread_config_32"list_for_each_ 224    port 23truct  224    ac#L244" id="L244" class="l239read_config_32"sw_to_"L22can.c#L238" id="L2sw_to_"L22can="L224"> 224    134ass="" id="L219" class="line" name="L219"> 1347s="line13ORT_GEN_MASTER" class="s13ORT>134_PORT_GEN_MASTER;read_config_32"r222lock_r_clasan.c#L222" id="L222lock_r_clas="L224"> 224    netidio/rio-scan.cnetref"s="line" name="L238"h    vid" 13sti>134;4.4x\n",STER;_MASTERread_config_32"rcan.c#L238" id="L238" class="line" name="L238"hopcoun did);for<24"> 224    i.c#L200" id="L2iclas2391   struct 135 PORT_GEN_MASTER;CSR 224    i.c#L200" id="L2iclas2<ss4"> 224    ef="MAX_ROUTE_ENTRIESv-> 224    netidio/rio-scan.cnetref"s="line" name="L238"h    1351ble master */>>>>>4"> 224    i.c#L200" id="L2iclas++)"> 23truct 135sref">net_list) {id);um);
 224     224    ef="GLOBAL_TABLEv->135OST_DID_LOCK_CSR,>net_list) {r */>>>>>4"> 224    i.c#L200" id="L2iclas,  class="sref">porthost_devicet);/{{{{{EINmaster *continue   struct  224    >135s="sref">result);sref">did));
->did));
)unlock_r_clasan.c#L222" id="L222unlock_r_clas="L224"> 224    netidio/rio-scan.cnetref"s="line" name="L238"h    135lass="sref">dsref">did));
136 PORTsref">did));
 1601361PORTref">did));
1362PORTof device
 * 13spa>1363PORTof device
 * @destid: De13"co>1364PORTof device
 * @hopcou13ass>1365PORTof device
 165136s="srof device
 k,"drivers/rapidio/rio-scan.c#L213" id="L213" c1367s="line13/extended device id from13/ex>136_PORTof device
13a><>1368PORTof device
 1681369PORTof device
 <>137 PORTof device
1s="line13.c#L170" id="L170" class13.c#>1371PORTof device
13>sref"untEaead_config_32"__d clni  224    mrio_244" id="L244" mrio_clas) 235                if ((1373to b> 23truct 13>">host_deviceo-suctEaead_config_32""L22netidio/rio-scan.c"L22netclas2*4"> 224    netidio/rio-scan.cnetref"239read_config_32"NULLidio/rio-scan.cNULLass=   struct 13>PORT_GEN_CTL_unsigned long9read_config_32"ta>ent.c#L200" id="L2ta>entass=   struct >137ass="" id="L219" class="line" name="L219"> 13>7s="line13.c#L176" id="L176" class13.c#>137_PORT_GEN_MAS4"> 224     runtkidio/rio-scan.c runtk="L224"> 224    KERN_INFOidio/rio-scan.cKERN_INFOto b2as/rapidio/rio-scan.c#L237" id="disco-sc master rio_ %d,-%s        224    mrio_244" id="L244" mrio_class="line" name="L238"it.c#L200" id="L2itass=l 235                if ((137;4.4x\n"4"> 224    mrio_244" id="L244" mrio_class="line" name="L238"4" cidio/rio-scan.cnams="L2)s 235                if (( 178137name="L158"> 158}
13- PORT_GEN_MASd k, allocate net and disco-sc peerse*="drivers/rapidio/rio-scan.c#L213" id="L213" c1381s="line13span class="comment"> * 13spa>13-1ble master *ummrio__is_acmevs="L224"> 224    mrio_244" id="L244" mrio_clas))"> 235                if (( * @destid: De13"co>13-sref">net_list) {4"> 224     r_d bugidio/rio-scan.c r_d bug="L224s/rapidio/rio-scan.c#L237" id="wait;for * @hopcou13ass>1383to b  struct  * @did: Device 13omm>138">host_devicet);/s="sref">portent.c#L200" id="L2ta>entass=239read_config_32"jiffisscan.c#L224" id=jiffissass=2+9read_config_32"CONFIG_RAPIDIO_DISC_TIMEOUTcan.c#L224" id=CONFIG_RAPIDIO_DISC_TIMEOUTclas2*9read_config_32"HZcan.c#L224" id=HZass=   struct  184138PORT_GEN_CTL_CSR,while 224    jiffisscan.c#L224" id=jiffissass= 224    ta>ent.c#L200" id="L2ta>entass=))"> 235                if ((138s="sref">result);master *umenum2verplete="L224"> 224    mrio_244" id="L244" mrio_clas)) 235                if (( 186138_PORT_GEN_MASTER;;;;;;;;;;;;;;;;;goto ne" name="L238"enum2doneidio/rio-scan.cenum2doneass=   struct u16 138;4.4x\n",;4"> 224    msleep244" id="L244" msleep="L2210)s 235                if ((138lass="sref">did);sref">did));
139 >hos 235                if ((,  224     r_d bugidio/rio-scan.c r_d bug="L224s/rapidio/rio-scan.c#L237" id="disco-scy timeout on mrio_ %d %s                       if ((139sref">net_list) {,;4"> 224    mrio_244" id="L244" mrio_class="line" name="L238"it.c#L200" id="L2itass=l>4"> 224    mrio_244" id="L244" mrio_class="line" name="L238"4" cidio/rio-scan.cnams="L2)s 235                if ((139OST_DID_LOCK_CSR,goto ne" name="L238"bailidio/rio-scan.cbailass=   struct  193139">hosne" name="L238"enum2doneidio/rio-scan.cenum2doneass=:"L204"> 204}
139PORT_GEN_CTL_CSR,a"> 224     r_d bugidio/rio-scan.c r_d bug="L224s/rapidio/rio-scan.c#L237" id="... * 13spa>139ass="" id="L219" class="line" name="L219"> 1397s="line13omment"> * @did: Device 13omm>139_PORT_GEN_MASTER;a"> 224    netidio/rio-scan.cnetref"239read_config_32"r222alloc2netidio/rio-scan.c"L22alloc2net="L224"> 224    mrio_244" id="L244" mrio_clasl_0, 0)s 235                if (( 197139;4.4x\n",um);
 235                if ((139lass="sref">did);ref">EINa>);
 224    KERN_ERev->1401ble master */sref">did));
140sref"ref">did));
140OST_DID_LOCK_CSR,a 193140">host_devicet);/s="sref">port 224    mrio_244" id="L244" mrio_clasl_4"> 224    ef="DID_rdev->port * 14apa>140s="sref">result);s="sref">port-> 224    mrio_244" id="L244" mrio_class="line" name="L238"sys_sizscan.c#L224" id=sys_sizs                if (( * @did: Device 14amm>14a_PORT_GEN_MASTER;TER;;;;;;;;;;;;;;;;;;;;;;;;;;;;s="sref">port 1971408to b  struct did);umdisc2peer="L224"> 224    netidio/rio-scan.cnetref" 224    mrio_244" id="L244" mrio_clas, read_config_32"ef="ANY_DESTIDv-> 224    mrio_244" id="L244" mrio_class="line" name="L238"sys_sizscan.c#L224" id=sys_sizs                if (( 209141 PORT_GEN_MASTER;CSR>ef">EINNNNNNNNNN0, read_config_32"NULLidio/rio-scan.cNULLass=, 0)"<ss0)"> 235                if ((1411ble master */>>>>>EINa>);
 224    KERN_INFOidio/rio-scan.cKERN_INFOto b 235                if ((net_list) {id);>>>>EINa 213141">host_devicet);/////////goto ne" name="L238"bailidio/rio-scan.cbailass=   struct 141PORT_GEN_CTL_CSR,sref">did));
141ass="" id="L219" class="line" name="L219"> 14"7s="line14/a>->build2#oute_tablss="L22a>);
141;4.4x\n"sref">did));
141name="L158"> 158}
1421ble ne" name="L238"bailidio/rio-scan.cbailass=:"L204"> 204}
/* Release h14s=">142sref">net_lis 174);
did));
142">hos


The original LXR softwars=by the=ef">didLXR versunityass=, this experis/raal ); didlxr@devux.noass=.
lxr.devux.no kindlydidRedpill Levpro ASass=, provider of Levux*consultcan and operations servlassesinas 1995.