1*4e1bc9a0SAchim Leubner /******************************************************************************* 2*4e1bc9a0SAchim Leubner *Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved. 3*4e1bc9a0SAchim Leubner * 4*4e1bc9a0SAchim Leubner *Redistribution and use in source and binary forms, with or without modification, are permitted provided 5*4e1bc9a0SAchim Leubner *that the following conditions are met: 6*4e1bc9a0SAchim Leubner *1. Redistributions of source code must retain the above copyright notice, this list of conditions and the 7*4e1bc9a0SAchim Leubner *following disclaimer. 8*4e1bc9a0SAchim Leubner *2. Redistributions in binary form must reproduce the above copyright notice, 9*4e1bc9a0SAchim Leubner *this list of conditions and the following disclaimer in the documentation and/or other materials provided 10*4e1bc9a0SAchim Leubner *with the distribution. 11*4e1bc9a0SAchim Leubner * 12*4e1bc9a0SAchim Leubner *THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED 13*4e1bc9a0SAchim Leubner *WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14*4e1bc9a0SAchim Leubner *FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 15*4e1bc9a0SAchim Leubner *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 16*4e1bc9a0SAchim Leubner *NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 17*4e1bc9a0SAchim Leubner *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 18*4e1bc9a0SAchim Leubner *LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 19*4e1bc9a0SAchim Leubner *SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 20*4e1bc9a0SAchim Leubner * 21*4e1bc9a0SAchim Leubner * 22*4e1bc9a0SAchim Leubner ********************************************************************************/ 23*4e1bc9a0SAchim Leubner /******************************************************************************** 24*4e1bc9a0SAchim Leubner * tiapi.h 25*4e1bc9a0SAchim Leubner * 26*4e1bc9a0SAchim Leubner * Abstract: This module contains function prototype of the Transport 27*4e1bc9a0SAchim Leubner * Independent API (TIAPI) Layer for both initiator and target. 28*4e1bc9a0SAchim Leubner ** Version Control Information: 29*4e1bc9a0SAchim Leubner ** 30*4e1bc9a0SAchim Leubner ** 31*4e1bc9a0SAchim Leubner *******************************************************************************/ 32*4e1bc9a0SAchim Leubner 33*4e1bc9a0SAchim Leubner 34*4e1bc9a0SAchim Leubner #ifndef TIAPI_H 35*4e1bc9a0SAchim Leubner #define TIAPI_H 36*4e1bc9a0SAchim Leubner 37*4e1bc9a0SAchim Leubner #include <dev/pms/RefTisa/tisa/api/tiglobal.h> 38*4e1bc9a0SAchim Leubner #include <dev/pms/RefTisa/tisa/api/titypes.h> 39*4e1bc9a0SAchim Leubner 40*4e1bc9a0SAchim Leubner /***************************************************************************** 41*4e1bc9a0SAchim Leubner * INITIATOR/TARGET SHARED APIs 42*4e1bc9a0SAchim Leubner *****************************************************************************/ 43*4e1bc9a0SAchim Leubner 44*4e1bc9a0SAchim Leubner osGLOBAL void tiCOMGetResource ( 45*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 46*4e1bc9a0SAchim Leubner tiLoLevelResource_t *loResource, 47*4e1bc9a0SAchim Leubner tiInitiatorResource_t *initiatorResource, 48*4e1bc9a0SAchim Leubner tiTargetResource_t *targetResource, 49*4e1bc9a0SAchim Leubner tiTdSharedMem_t *tdSharedMem 50*4e1bc9a0SAchim Leubner ); 51*4e1bc9a0SAchim Leubner 52*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMInit( 53*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 54*4e1bc9a0SAchim Leubner tiLoLevelResource_t *loResource, 55*4e1bc9a0SAchim Leubner tiInitiatorResource_t *initiatorResource, 56*4e1bc9a0SAchim Leubner tiTargetResource_t *targetResource, 57*4e1bc9a0SAchim Leubner tiTdSharedMem_t *tdSharedMem 58*4e1bc9a0SAchim Leubner ); 59*4e1bc9a0SAchim Leubner 60*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMPortInit( 61*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 62*4e1bc9a0SAchim Leubner bit32 sysIntsActive 63*4e1bc9a0SAchim Leubner ); 64*4e1bc9a0SAchim Leubner 65*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMPortStart( 66*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 67*4e1bc9a0SAchim Leubner bit32 portID, 68*4e1bc9a0SAchim Leubner tiPortalContext_t *portalContext, 69*4e1bc9a0SAchim Leubner bit32 option 70*4e1bc9a0SAchim Leubner ); 71*4e1bc9a0SAchim Leubner 72*4e1bc9a0SAchim Leubner osGLOBAL void tiCOMShutDown( tiRoot_t *tiRoot); 73*4e1bc9a0SAchim Leubner 74*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMPortStop( 75*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 76*4e1bc9a0SAchim Leubner tiPortalContext_t *portalContext 77*4e1bc9a0SAchim Leubner ); 78*4e1bc9a0SAchim Leubner 79*4e1bc9a0SAchim Leubner osGLOBAL void tiCOMReset ( 80*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 81*4e1bc9a0SAchim Leubner bit32 option 82*4e1bc9a0SAchim Leubner ); 83*4e1bc9a0SAchim Leubner 84*4e1bc9a0SAchim Leubner osGLOBAL bit32 85*4e1bc9a0SAchim Leubner tdsaGetNumOfLUNIOCTL( 86*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 87*4e1bc9a0SAchim Leubner tiIOCTLPayload_t *agIOCTLPayload, 88*4e1bc9a0SAchim Leubner void *agParam1, 89*4e1bc9a0SAchim Leubner void *agParam2, 90*4e1bc9a0SAchim Leubner void *agParam3 91*4e1bc9a0SAchim Leubner ); 92*4e1bc9a0SAchim Leubner 93*4e1bc9a0SAchim Leubner osGLOBAL void ostiNumOfLUNIOCTLRsp( 94*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 95*4e1bc9a0SAchim Leubner bit32 status 96*4e1bc9a0SAchim Leubner ); 97*4e1bc9a0SAchim Leubner osGLOBAL bit32 98*4e1bc9a0SAchim Leubner tiNumOfLunIOCTLreq( 99*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 100*4e1bc9a0SAchim Leubner tiIORequest_t *tiIORequest, 101*4e1bc9a0SAchim Leubner tiDeviceHandle_t *tiDeviceHandle, 102*4e1bc9a0SAchim Leubner void *tiRequestBody, 103*4e1bc9a0SAchim Leubner tiIOCTLPayload_t *agIOCTLPayload, 104*4e1bc9a0SAchim Leubner void *agParam1, 105*4e1bc9a0SAchim Leubner void *agParam2 106*4e1bc9a0SAchim Leubner ); 107*4e1bc9a0SAchim Leubner 108*4e1bc9a0SAchim Leubner 109*4e1bc9a0SAchim Leubner osGLOBAL FORCEINLINE bit32 tiCOMInterruptHandler( 110*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 111*4e1bc9a0SAchim Leubner bit32 channelNum 112*4e1bc9a0SAchim Leubner ); 113*4e1bc9a0SAchim Leubner 114*4e1bc9a0SAchim Leubner osGLOBAL FORCEINLINE bit32 tiCOMDelayedInterruptHandler ( 115*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 116*4e1bc9a0SAchim Leubner bit32 channelNum, 117*4e1bc9a0SAchim Leubner bit32 count, 118*4e1bc9a0SAchim Leubner bit32 context 119*4e1bc9a0SAchim Leubner ); 120*4e1bc9a0SAchim Leubner 121*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMLegacyInterruptHandler( 122*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 123*4e1bc9a0SAchim Leubner bit32 channelNum 124*4e1bc9a0SAchim Leubner ); 125*4e1bc9a0SAchim Leubner 126*4e1bc9a0SAchim Leubner 127*4e1bc9a0SAchim Leubner osGLOBAL void tiCOMLegacyDelayedInterruptHandler( 128*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 129*4e1bc9a0SAchim Leubner bit32 channelNum, 130*4e1bc9a0SAchim Leubner bit32 count, 131*4e1bc9a0SAchim Leubner bit32 context 132*4e1bc9a0SAchim Leubner ); 133*4e1bc9a0SAchim Leubner osGLOBAL void tiCOMTimerTick( tiRoot_t *tiRoot ); 134*4e1bc9a0SAchim Leubner 135*4e1bc9a0SAchim Leubner osGLOBAL void tiCOMSystemInterruptsActive ( 136*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot , 137*4e1bc9a0SAchim Leubner bit32 sysIntsActive 138*4e1bc9a0SAchim Leubner ); 139*4e1bc9a0SAchim Leubner 140*4e1bc9a0SAchim Leubner 141*4e1bc9a0SAchim Leubner osGLOBAL FORCEINLINE void 142*4e1bc9a0SAchim Leubner tiCOMInterruptEnable( 143*4e1bc9a0SAchim Leubner tiRoot_t * tiRoot, 144*4e1bc9a0SAchim Leubner bit32 channelNum); 145*4e1bc9a0SAchim Leubner 146*4e1bc9a0SAchim Leubner osGLOBAL void tiCOMFrameReadBlock( 147*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 148*4e1bc9a0SAchim Leubner void *agFrame, 149*4e1bc9a0SAchim Leubner bit32 FrameOffset, 150*4e1bc9a0SAchim Leubner void *FrameBuffer, 151*4e1bc9a0SAchim Leubner bit32 FrameBufLen ); 152*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMEncryptGetInfo( 153*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot); 154*4e1bc9a0SAchim Leubner 155*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMEncryptSetMode( 156*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 157*4e1bc9a0SAchim Leubner bit32 securityCipherMode 158*4e1bc9a0SAchim Leubner ); 159*4e1bc9a0SAchim Leubner 160*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMSetControllerConfig ( 161*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 162*4e1bc9a0SAchim Leubner bit32 modePage, 163*4e1bc9a0SAchim Leubner bit32 length, 164*4e1bc9a0SAchim Leubner void *buffer, 165*4e1bc9a0SAchim Leubner void *context 166*4e1bc9a0SAchim Leubner ); 167*4e1bc9a0SAchim Leubner 168*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMGetControllerConfig( 169*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 170*4e1bc9a0SAchim Leubner bit32 modePage, 171*4e1bc9a0SAchim Leubner bit32 flag, 172*4e1bc9a0SAchim Leubner void *context 173*4e1bc9a0SAchim Leubner ); 174*4e1bc9a0SAchim Leubner 175*4e1bc9a0SAchim Leubner 176*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMEncryptDekAdd( 177*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 178*4e1bc9a0SAchim Leubner bit32 kekIndex, 179*4e1bc9a0SAchim Leubner bit32 dekTableSelect, 180*4e1bc9a0SAchim Leubner bit32 dekAddrHi, 181*4e1bc9a0SAchim Leubner bit32 dekAddrLo, 182*4e1bc9a0SAchim Leubner bit32 dekIndex, 183*4e1bc9a0SAchim Leubner bit32 dekNumberOfEntries, 184*4e1bc9a0SAchim Leubner bit32 dekBlobFormat, 185*4e1bc9a0SAchim Leubner bit32 dekTableKeyEntrySize 186*4e1bc9a0SAchim Leubner ); 187*4e1bc9a0SAchim Leubner 188*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMEncryptDekInvalidate( 189*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 190*4e1bc9a0SAchim Leubner bit32 dekTable, 191*4e1bc9a0SAchim Leubner bit32 dekIndex 192*4e1bc9a0SAchim Leubner ); 193*4e1bc9a0SAchim Leubner 194*4e1bc9a0SAchim Leubner 195*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMEncryptKekAdd( 196*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 197*4e1bc9a0SAchim Leubner bit32 kekIndex, 198*4e1bc9a0SAchim Leubner bit32 wrapperKekIndex, 199*4e1bc9a0SAchim Leubner bit32 blobFormat, 200*4e1bc9a0SAchim Leubner tiEncryptKekBlob_t *encryptKekBlob 201*4e1bc9a0SAchim Leubner ); 202*4e1bc9a0SAchim Leubner 203*4e1bc9a0SAchim Leubner osGLOBAL tiDeviceHandle_t * 204*4e1bc9a0SAchim Leubner tiINIGetExpDeviceHandleBySasAddress( 205*4e1bc9a0SAchim Leubner tiRoot_t * tiRoot, 206*4e1bc9a0SAchim Leubner tiPortalContext_t * tiPortalContext, 207*4e1bc9a0SAchim Leubner bit32 sas_addr_hi, 208*4e1bc9a0SAchim Leubner bit32 sas_addr_lo, 209*4e1bc9a0SAchim Leubner bit32 maxDevs 210*4e1bc9a0SAchim Leubner ); 211*4e1bc9a0SAchim Leubner 212*4e1bc9a0SAchim Leubner 213*4e1bc9a0SAchim Leubner #ifdef HIALEAH_ENCRYPTION 214*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMEncryptHilSet(tiRoot_t *tiRoot ); 215*4e1bc9a0SAchim Leubner #endif /* HIALEAH_ENCRYPTION */ 216*4e1bc9a0SAchim Leubner 217*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMEncryptKekStore( 218*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 219*4e1bc9a0SAchim Leubner bit32 kekIndex 220*4e1bc9a0SAchim Leubner ); 221*4e1bc9a0SAchim Leubner 222*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMEncryptKekLoad( 223*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 224*4e1bc9a0SAchim Leubner bit32 kekIndex 225*4e1bc9a0SAchim Leubner ); 226*4e1bc9a0SAchim Leubner 227*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMEncryptSelfTest( 228*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 229*4e1bc9a0SAchim Leubner bit32 type, 230*4e1bc9a0SAchim Leubner bit32 length, 231*4e1bc9a0SAchim Leubner void *TestDescriptor 232*4e1bc9a0SAchim Leubner ); 233*4e1bc9a0SAchim Leubner 234*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMSetOperator( 235*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 236*4e1bc9a0SAchim Leubner bit32 flag, 237*4e1bc9a0SAchim Leubner void *cert 238*4e1bc9a0SAchim Leubner ); 239*4e1bc9a0SAchim Leubner 240*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMGetOperator( 241*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 242*4e1bc9a0SAchim Leubner bit32 option, 243*4e1bc9a0SAchim Leubner bit32 AddrHi, 244*4e1bc9a0SAchim Leubner bit32 AddrLo 245*4e1bc9a0SAchim Leubner ); 246*4e1bc9a0SAchim Leubner 247*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMOperatorManagement( 248*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 249*4e1bc9a0SAchim Leubner bit32 flag, 250*4e1bc9a0SAchim Leubner bit8 role, 251*4e1bc9a0SAchim Leubner tiID_t *idString, 252*4e1bc9a0SAchim Leubner tiEncryptKekBlob_t *kekBlob 253*4e1bc9a0SAchim Leubner ); 254*4e1bc9a0SAchim Leubner 255*4e1bc9a0SAchim Leubner /* 256*4e1bc9a0SAchim Leubner * PMC-Sierra Management IOCTL module 257*4e1bc9a0SAchim Leubner */ 258*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMMgntIOCTL( 259*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 260*4e1bc9a0SAchim Leubner tiIOCTLPayload_t *agIOCTLPayload, 261*4e1bc9a0SAchim Leubner void *agParam1, 262*4e1bc9a0SAchim Leubner void *agParam2, 263*4e1bc9a0SAchim Leubner void *agParam3 264*4e1bc9a0SAchim Leubner ); 265*4e1bc9a0SAchim Leubner 266*4e1bc9a0SAchim Leubner osGLOBAL void ostiCOMMgntIOCTLRsp( 267*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 268*4e1bc9a0SAchim Leubner bit32 status 269*4e1bc9a0SAchim Leubner ); 270*4e1bc9a0SAchim Leubner 271*4e1bc9a0SAchim Leubner osGLOBAL void ostiRegDumpIOCTLRsp( 272*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 273*4e1bc9a0SAchim Leubner bit32 status 274*4e1bc9a0SAchim Leubner ); 275*4e1bc9a0SAchim Leubner 276*4e1bc9a0SAchim Leubner osGLOBAL void ostiSetNVMDIOCTLRsp( 277*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 278*4e1bc9a0SAchim Leubner bit32 status 279*4e1bc9a0SAchim Leubner ); 280*4e1bc9a0SAchim Leubner 281*4e1bc9a0SAchim Leubner osGLOBAL void ostiGetPhyProfileIOCTLRsp( 282*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 283*4e1bc9a0SAchim Leubner bit32 status 284*4e1bc9a0SAchim Leubner ); 285*4e1bc9a0SAchim Leubner 286*4e1bc9a0SAchim Leubner osGLOBAL void ostiGetNVMDIOCTLRsp( 287*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 288*4e1bc9a0SAchim Leubner bit32 status 289*4e1bc9a0SAchim Leubner ); 290*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMGetPortInfo( 291*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 292*4e1bc9a0SAchim Leubner tiPortalContext_t *portalContext, 293*4e1bc9a0SAchim Leubner tiPortInfo_t *tiPortInfo 294*4e1bc9a0SAchim Leubner ); 295*4e1bc9a0SAchim Leubner 296*4e1bc9a0SAchim Leubner osGLOBAL void ostiSendSMPIOCTLRsp( 297*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 298*4e1bc9a0SAchim Leubner bit32 status 299*4e1bc9a0SAchim Leubner ); 300*4e1bc9a0SAchim Leubner 301*4e1bc9a0SAchim Leubner osGLOBAL void ostiGenEventIOCTLRsp( 302*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 303*4e1bc9a0SAchim Leubner bit32 status 304*4e1bc9a0SAchim Leubner ); 305*4e1bc9a0SAchim Leubner 306*4e1bc9a0SAchim Leubner osGLOBAL void 307*4e1bc9a0SAchim Leubner ostiGetDeviceInfoIOCTLRsp( 308*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 309*4e1bc9a0SAchim Leubner bit32 status, 310*4e1bc9a0SAchim Leubner void *param 311*4e1bc9a0SAchim Leubner ); 312*4e1bc9a0SAchim Leubner 313*4e1bc9a0SAchim Leubner osGLOBAL void 314*4e1bc9a0SAchim Leubner ostiGetIoErrorStatsIOCTLRsp( 315*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 316*4e1bc9a0SAchim Leubner bit32 status, 317*4e1bc9a0SAchim Leubner void *param 318*4e1bc9a0SAchim Leubner ); 319*4e1bc9a0SAchim Leubner 320*4e1bc9a0SAchim Leubner osGLOBAL void 321*4e1bc9a0SAchim Leubner ostiGetIoEventStatsIOCTLRsp( 322*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 323*4e1bc9a0SAchim Leubner bit32 status, 324*4e1bc9a0SAchim Leubner void *param 325*4e1bc9a0SAchim Leubner ); 326*4e1bc9a0SAchim Leubner 327*4e1bc9a0SAchim Leubner osGLOBAL void 328*4e1bc9a0SAchim Leubner ostiGetForensicDataIOCTLRsp( 329*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 330*4e1bc9a0SAchim Leubner bit32 status, 331*4e1bc9a0SAchim Leubner void *param 332*4e1bc9a0SAchim Leubner ); 333*4e1bc9a0SAchim Leubner 334*4e1bc9a0SAchim Leubner 335*4e1bc9a0SAchim Leubner #ifdef SPC_ENABLE_PROFILE 336*4e1bc9a0SAchim Leubner osGLOBAL void ostiFWProfileIOCTLRsp( 337*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 338*4e1bc9a0SAchim Leubner bit32 status, 339*4e1bc9a0SAchim Leubner bit32 len 340*4e1bc9a0SAchim Leubner ); 341*4e1bc9a0SAchim Leubner #endif 342*4e1bc9a0SAchim Leubner 343*4e1bc9a0SAchim Leubner /***************************************************************************** 344*4e1bc9a0SAchim Leubner * INITIATOR SPECIFIC APIs 345*4e1bc9a0SAchim Leubner *****************************************************************************/ 346*4e1bc9a0SAchim Leubner 347*4e1bc9a0SAchim Leubner /* 348*4e1bc9a0SAchim Leubner * Session management module. 349*4e1bc9a0SAchim Leubner */ 350*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINIGetExpander( 351*4e1bc9a0SAchim Leubner tiRoot_t * tiRoot, 352*4e1bc9a0SAchim Leubner tiPortalContext_t * tiPortalContext, 353*4e1bc9a0SAchim Leubner tiDeviceHandle_t * tiDev, 354*4e1bc9a0SAchim Leubner tiDeviceHandle_t ** tiExp 355*4e1bc9a0SAchim Leubner ); 356*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINIGetDeviceHandles( 357*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 358*4e1bc9a0SAchim Leubner tiPortalContext_t *portalContext, 359*4e1bc9a0SAchim Leubner tiDeviceHandle_t *agDev[], 360*4e1bc9a0SAchim Leubner bit32 maxDevs 361*4e1bc9a0SAchim Leubner ); 362*4e1bc9a0SAchim Leubner 363*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINIGetDeviceHandlesForWinIOCTL( 364*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 365*4e1bc9a0SAchim Leubner tiPortalContext_t *portalContext, 366*4e1bc9a0SAchim Leubner tiDeviceHandle_t *agDev[], 367*4e1bc9a0SAchim Leubner bit32 maxDevs 368*4e1bc9a0SAchim Leubner ); 369*4e1bc9a0SAchim Leubner 370*4e1bc9a0SAchim Leubner osGLOBAL void tiIniGetDirectSataSasAddr(tiRoot_t * tiRoot, bit32 phyId, bit8 **sasAddressHi, bit8 **sasAddressLo); 371*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINIDiscoverTargets( 372*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 373*4e1bc9a0SAchim Leubner tiPortalContext_t *portalContext, 374*4e1bc9a0SAchim Leubner bit32 option 375*4e1bc9a0SAchim Leubner ); 376*4e1bc9a0SAchim Leubner 377*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINILogin( 378*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 379*4e1bc9a0SAchim Leubner tiDeviceHandle_t *tiDeviceHandle 380*4e1bc9a0SAchim Leubner ); 381*4e1bc9a0SAchim Leubner 382*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINILogout( 383*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 384*4e1bc9a0SAchim Leubner tiDeviceHandle_t *tiDeviceHandle 385*4e1bc9a0SAchim Leubner ); 386*4e1bc9a0SAchim Leubner 387*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINIGetDeviceInfo( 388*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 389*4e1bc9a0SAchim Leubner tiDeviceHandle_t *tiDeviceHandle, 390*4e1bc9a0SAchim Leubner tiDeviceInfo_t *tiDeviceInfo); 391*4e1bc9a0SAchim Leubner 392*4e1bc9a0SAchim Leubner /* 393*4e1bc9a0SAchim Leubner * Transport recovery module. 394*4e1bc9a0SAchim Leubner */ 395*4e1bc9a0SAchim Leubner osGLOBAL void tiINITransportRecovery( 396*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 397*4e1bc9a0SAchim Leubner tiDeviceHandle_t *tiDeviceHandle 398*4e1bc9a0SAchim Leubner ); 399*4e1bc9a0SAchim Leubner 400*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINITaskManagement ( 401*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 402*4e1bc9a0SAchim Leubner tiDeviceHandle_t *tiDeviceHandle, 403*4e1bc9a0SAchim Leubner bit32 task, 404*4e1bc9a0SAchim Leubner tiLUN_t *lun, 405*4e1bc9a0SAchim Leubner tiIORequest_t *taskTag, 406*4e1bc9a0SAchim Leubner tiIORequest_t *currentTaskTag 407*4e1bc9a0SAchim Leubner ); 408*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINISMPStart( 409*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 410*4e1bc9a0SAchim Leubner tiIORequest_t *tiIORequest, 411*4e1bc9a0SAchim Leubner tiDeviceHandle_t *tiDeviceHandle, 412*4e1bc9a0SAchim Leubner tiSMPFrame_t *tiScsiRequest, 413*4e1bc9a0SAchim Leubner void *tiSMPBody, 414*4e1bc9a0SAchim Leubner bit32 interruptContext 415*4e1bc9a0SAchim Leubner ); 416*4e1bc9a0SAchim Leubner /* 417*4e1bc9a0SAchim Leubner * I/O module. 418*4e1bc9a0SAchim Leubner */ 419*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINIIOStart( 420*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 421*4e1bc9a0SAchim Leubner tiIORequest_t *tiIORequest, 422*4e1bc9a0SAchim Leubner tiDeviceHandle_t *tiDeviceHandle, 423*4e1bc9a0SAchim Leubner tiScsiInitiatorRequest_t *tiScsiRequest, 424*4e1bc9a0SAchim Leubner void *tiRequestBody, 425*4e1bc9a0SAchim Leubner bit32 interruptContext 426*4e1bc9a0SAchim Leubner ); 427*4e1bc9a0SAchim Leubner 428*4e1bc9a0SAchim Leubner osGLOBAL void tiINIDebugDumpIO( 429*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 430*4e1bc9a0SAchim Leubner tiIORequest_t *tiIORequest 431*4e1bc9a0SAchim Leubner ); 432*4e1bc9a0SAchim Leubner 433*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINIIOStartDif( 434*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 435*4e1bc9a0SAchim Leubner tiIORequest_t *tiIORequest, 436*4e1bc9a0SAchim Leubner tiDeviceHandle_t *tiDeviceHandle, 437*4e1bc9a0SAchim Leubner tiScsiInitiatorRequest_t *tiScsiRequest, 438*4e1bc9a0SAchim Leubner void *tiRequestBody, 439*4e1bc9a0SAchim Leubner bit32 interruptContext, 440*4e1bc9a0SAchim Leubner tiDif_t *difOption 441*4e1bc9a0SAchim Leubner ); 442*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINISuperIOStart ( 443*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 444*4e1bc9a0SAchim Leubner tiIORequest_t *tiIORequest, 445*4e1bc9a0SAchim Leubner tiDeviceHandle_t *tiDeviceHandle, 446*4e1bc9a0SAchim Leubner tiSuperScsiInitiatorRequest_t *tiScsiRequest, 447*4e1bc9a0SAchim Leubner void *tiRequestBody, 448*4e1bc9a0SAchim Leubner bit32 interruptContext 449*4e1bc9a0SAchim Leubner ); 450*4e1bc9a0SAchim Leubner 451*4e1bc9a0SAchim Leubner #ifdef FAST_IO_TEST 452*4e1bc9a0SAchim Leubner osGLOBAL void *tiINIFastIOPrepare( 453*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 454*4e1bc9a0SAchim Leubner void *ioHandle, 455*4e1bc9a0SAchim Leubner agsaFastCommand_t *fc); 456*4e1bc9a0SAchim Leubner 457*4e1bc9a0SAchim Leubner osGLOBAL void* 458*4e1bc9a0SAchim Leubner tiINIFastIOPrepare2( 459*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 460*4e1bc9a0SAchim Leubner void *ioHandle, 461*4e1bc9a0SAchim Leubner agsaFastCommand_t *fc, 462*4e1bc9a0SAchim Leubner void *pMessage, 463*4e1bc9a0SAchim Leubner void *pRequest); 464*4e1bc9a0SAchim Leubner 465*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINIFastIOSend(void *ioHandle); 466*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINIFastIOCancel(void *ioHandle); 467*4e1bc9a0SAchim Leubner #endif 468*4e1bc9a0SAchim Leubner 469*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMEncryptGetMode(tiRoot_t *tiRoot); 470*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiCOMEncryptSetOn_Off(tiRoot_t *tiRoot, bit32 On); 471*4e1bc9a0SAchim Leubner 472*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiInitDevEncrypt( 473*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 474*4e1bc9a0SAchim Leubner void *tideviceptr ); 475*4e1bc9a0SAchim Leubner 476*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiTGTSuperIOStart ( 477*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 478*4e1bc9a0SAchim Leubner tiIORequest_t *tiIORequest, 479*4e1bc9a0SAchim Leubner tiSuperScsiTargetRequest_t *tiScsiRequest 480*4e1bc9a0SAchim Leubner ); 481*4e1bc9a0SAchim Leubner 482*4e1bc9a0SAchim Leubner osGLOBAL void tiINITimerTick( 483*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot 484*4e1bc9a0SAchim Leubner ); 485*4e1bc9a0SAchim Leubner 486*4e1bc9a0SAchim Leubner 487*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINIIOAbort( 488*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 489*4e1bc9a0SAchim Leubner tiIORequest_t *taskTag 490*4e1bc9a0SAchim Leubner ); 491*4e1bc9a0SAchim Leubner 492*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINIIOAbortAll( 493*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 494*4e1bc9a0SAchim Leubner tiDeviceHandle_t *tiDeviceHandle 495*4e1bc9a0SAchim Leubner ); 496*4e1bc9a0SAchim Leubner /* 497*4e1bc9a0SAchim Leubner * Event Logging module 498*4e1bc9a0SAchim Leubner */ 499*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiINIReportErrorToEventLog( 500*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 501*4e1bc9a0SAchim Leubner tiEVTData_t *agEventData 502*4e1bc9a0SAchim Leubner ); 503*4e1bc9a0SAchim Leubner 504*4e1bc9a0SAchim Leubner 505*4e1bc9a0SAchim Leubner /***************************************************************************** 506*4e1bc9a0SAchim Leubner * TARGET SPECIFIC APIs 507*4e1bc9a0SAchim Leubner *****************************************************************************/ 508*4e1bc9a0SAchim Leubner 509*4e1bc9a0SAchim Leubner osGLOBAL void tiTGTTimerTick( 510*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot 511*4e1bc9a0SAchim Leubner ); 512*4e1bc9a0SAchim Leubner 513*4e1bc9a0SAchim Leubner osGLOBAL void *tiTGTSenseBufferGet( 514*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 515*4e1bc9a0SAchim Leubner tiIORequest_t *tiIORequest, 516*4e1bc9a0SAchim Leubner bit32 length 517*4e1bc9a0SAchim Leubner ); 518*4e1bc9a0SAchim Leubner 519*4e1bc9a0SAchim Leubner osGLOBAL void tiTGTSetResp( 520*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 521*4e1bc9a0SAchim Leubner tiIORequest_t *tiIORequest, 522*4e1bc9a0SAchim Leubner bit32 dataSentLength, 523*4e1bc9a0SAchim Leubner bit8 ScsiStatus, 524*4e1bc9a0SAchim Leubner bit32 senseLength 525*4e1bc9a0SAchim Leubner ); 526*4e1bc9a0SAchim Leubner 527*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiTGTIOStart ( 528*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 529*4e1bc9a0SAchim Leubner tiIORequest_t *tiIORequest, 530*4e1bc9a0SAchim Leubner bit32 dataOffset, 531*4e1bc9a0SAchim Leubner bit32 dataLength, 532*4e1bc9a0SAchim Leubner tiSgl_t *dataSGL, 533*4e1bc9a0SAchim Leubner void *sglVirtualAddr 534*4e1bc9a0SAchim Leubner ); 535*4e1bc9a0SAchim Leubner 536*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiTGTIOStartMirror ( 537*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 538*4e1bc9a0SAchim Leubner tiIORequest_t *tiIORequest, 539*4e1bc9a0SAchim Leubner bit32 dataOffset, 540*4e1bc9a0SAchim Leubner bit32 dataLength, 541*4e1bc9a0SAchim Leubner tiSgl_t *dataSGL, 542*4e1bc9a0SAchim Leubner void *sglVirtualAddr, 543*4e1bc9a0SAchim Leubner tiSgl_t *dataSGLMirror, 544*4e1bc9a0SAchim Leubner void *sglVirtualAddrMirror 545*4e1bc9a0SAchim Leubner ); 546*4e1bc9a0SAchim Leubner 547*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiTGTIOStartDif ( 548*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 549*4e1bc9a0SAchim Leubner tiIORequest_t *tiIORequest, 550*4e1bc9a0SAchim Leubner bit32 dataOffset, 551*4e1bc9a0SAchim Leubner bit32 dataLength, 552*4e1bc9a0SAchim Leubner tiSgl_t *dataSGL, 553*4e1bc9a0SAchim Leubner void *sglVirtualAddr, 554*4e1bc9a0SAchim Leubner tiDif_t *difOption 555*4e1bc9a0SAchim Leubner ); 556*4e1bc9a0SAchim Leubner 557*4e1bc9a0SAchim Leubner 558*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiTGTGetDeviceHandles( 559*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 560*4e1bc9a0SAchim Leubner tiPortalContext_t *portalContext, 561*4e1bc9a0SAchim Leubner tiDeviceHandle_t *agDev[], 562*4e1bc9a0SAchim Leubner bit32 maxDevs 563*4e1bc9a0SAchim Leubner ); 564*4e1bc9a0SAchim Leubner 565*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiTGTGetDeviceInfo( 566*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 567*4e1bc9a0SAchim Leubner tiDeviceHandle_t *tiDeviceHandle, 568*4e1bc9a0SAchim Leubner tiDeviceInfo_t *tiDeviceInfo); 569*4e1bc9a0SAchim Leubner 570*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiTGTIOAbort( 571*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 572*4e1bc9a0SAchim Leubner tiIORequest_t *taskTag 573*4e1bc9a0SAchim Leubner ); 574*4e1bc9a0SAchim Leubner 575*4e1bc9a0SAchim Leubner osGLOBAL bit32 tiTGTSendTmResp ( 576*4e1bc9a0SAchim Leubner tiRoot_t *tiRoot, 577*4e1bc9a0SAchim Leubner tiIORequest_t *tiTMRequest, 578*4e1bc9a0SAchim Leubner bit32 status 579*4e1bc9a0SAchim Leubner ); 580*4e1bc9a0SAchim Leubner 581*4e1bc9a0SAchim Leubner void tiPCI_TRIGGER( tiRoot_t *tiRoot); 582*4e1bc9a0SAchim Leubner 583*4e1bc9a0SAchim Leubner void tiComCountActiveIORequests( tiRoot_t *tiRoot); 584*4e1bc9a0SAchim Leubner 585*4e1bc9a0SAchim Leubner #endif /* TIAPI_H */ 586