1285809Sscottl/******************************************************************************* 2285809Sscottl*Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved. 3285809Sscottl* 4285809Sscottl*Redistribution and use in source and binary forms, with or without modification, are permitted provided 5285809Sscottl*that the following conditions are met: 6285809Sscottl*1. Redistributions of source code must retain the above copyright notice, this list of conditions and the 7285809Sscottl*following disclaimer. 8285809Sscottl*2. Redistributions in binary form must reproduce the above copyright notice, 9285809Sscottl*this list of conditions and the following disclaimer in the documentation and/or other materials provided 10285809Sscottl*with the distribution. 11285809Sscottl* 12285809Sscottl*THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED 13285809Sscottl*WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14285809Sscottl*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 15285809Sscottl*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 16285809Sscottl*NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 17285809Sscottl*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 18285809Sscottl*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 19285809Sscottl*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 20285809Sscottl* 21285809Sscottl* $FreeBSD$ 22285809Sscottl* 23285809Sscottl********************************************************************************/ 24285809Sscottl/******************************************************************************** 25285809Sscottl* tiapi.h 26285809Sscottl* 27285809Sscottl* Abstract: This module contains function prototype of the Transport 28285809Sscottl* Independent API (TIAPI) Layer for both initiator and target. 29285809Sscottl** Version Control Information: 30285809Sscottl** 31285809Sscottl** 32285809Sscottl*******************************************************************************/ 33285809Sscottl 34285809Sscottl 35285809Sscottl#ifndef TIAPI_H 36285809Sscottl#define TIAPI_H 37285809Sscottl 38285809Sscottl#include <dev/pms/RefTisa/tisa/api/tiglobal.h> 39285809Sscottl#include <dev/pms/RefTisa/tisa/api/titypes.h> 40285809Sscottl 41285809Sscottl/***************************************************************************** 42285809Sscottl * INITIATOR/TARGET SHARED APIs 43285809Sscottl *****************************************************************************/ 44285809Sscottl 45285809SscottlosGLOBAL void tiCOMGetResource ( 46285809Sscottl tiRoot_t *tiRoot, 47285809Sscottl tiLoLevelResource_t *loResource, 48285809Sscottl tiInitiatorResource_t *initiatorResource, 49285809Sscottl tiTargetResource_t *targetResource, 50285809Sscottl tiTdSharedMem_t *tdSharedMem 51285809Sscottl ); 52285809Sscottl 53285809SscottlosGLOBAL bit32 tiCOMInit( 54285809Sscottl tiRoot_t *tiRoot, 55285809Sscottl tiLoLevelResource_t *loResource, 56285809Sscottl tiInitiatorResource_t *initiatorResource, 57285809Sscottl tiTargetResource_t *targetResource, 58285809Sscottl tiTdSharedMem_t *tdSharedMem 59285809Sscottl ); 60285809Sscottl 61285809SscottlosGLOBAL bit32 tiCOMPortInit( 62285809Sscottl tiRoot_t *tiRoot, 63285809Sscottl bit32 sysIntsActive 64285809Sscottl ); 65285809Sscottl 66285809SscottlosGLOBAL bit32 tiCOMPortStart( 67285809Sscottl tiRoot_t *tiRoot, 68285809Sscottl bit32 portID, 69285809Sscottl tiPortalContext_t *portalContext, 70285809Sscottl bit32 option 71285809Sscottl ); 72285809Sscottl 73285809SscottlosGLOBAL void tiCOMShutDown( tiRoot_t *tiRoot); 74285809Sscottl 75285809SscottlosGLOBAL bit32 tiCOMPortStop( 76285809Sscottl tiRoot_t *tiRoot, 77285809Sscottl tiPortalContext_t *portalContext 78285809Sscottl ); 79285809Sscottl 80285809SscottlosGLOBAL void tiCOMReset ( 81285809Sscottl tiRoot_t *tiRoot, 82285809Sscottl bit32 option 83285809Sscottl ); 84285809Sscottl 85285809SscottlosGLOBAL bit32 86285809SscottltdsaGetNumOfLUNIOCTL( 87285809Sscottl tiRoot_t *tiRoot, 88285809Sscottl tiIOCTLPayload_t *agIOCTLPayload, 89285809Sscottl void *agParam1, 90285809Sscottl void *agParam2, 91285809Sscottl void *agParam3 92285809Sscottl ); 93285809Sscottl 94285809SscottlosGLOBAL void ostiNumOfLUNIOCTLRsp( 95285809Sscottl tiRoot_t *tiRoot, 96285809Sscottl bit32 status 97285809Sscottl ); 98285809SscottlosGLOBAL bit32 99285809SscottltiNumOfLunIOCTLreq( 100285809Sscottl tiRoot_t *tiRoot, 101285809Sscottl tiIORequest_t *tiIORequest, 102285809Sscottl tiDeviceHandle_t *tiDeviceHandle, 103285809Sscottl void *tiRequestBody, 104285809Sscottl tiIOCTLPayload_t *agIOCTLPayload, 105285809Sscottl void *agParam1, 106285809Sscottl void *agParam2 107285809Sscottl ); 108285809Sscottl 109285809Sscottl 110285809SscottlosGLOBAL FORCEINLINE bit32 tiCOMInterruptHandler( 111285809Sscottl tiRoot_t *tiRoot, 112285809Sscottl bit32 channelNum 113285809Sscottl ); 114285809Sscottl 115285809SscottlosGLOBAL FORCEINLINE bit32 tiCOMDelayedInterruptHandler ( 116285809Sscottl tiRoot_t *tiRoot, 117285809Sscottl bit32 channelNum, 118285809Sscottl bit32 count, 119285809Sscottl bit32 context 120285809Sscottl ); 121285809Sscottl 122285809SscottlosGLOBAL bit32 tiCOMLegacyInterruptHandler( 123285809Sscottl tiRoot_t *tiRoot, 124285809Sscottl bit32 channelNum 125285809Sscottl ); 126285809Sscottl 127285809Sscottl 128285809SscottlosGLOBAL void tiCOMLegacyDelayedInterruptHandler( 129285809Sscottl tiRoot_t *tiRoot, 130285809Sscottl bit32 channelNum, 131285809Sscottl bit32 count, 132285809Sscottl bit32 context 133285809Sscottl ); 134285809SscottlosGLOBAL void tiCOMTimerTick( tiRoot_t *tiRoot ); 135285809Sscottl 136285809SscottlosGLOBAL void tiCOMSystemInterruptsActive ( 137285809Sscottl tiRoot_t *tiRoot , 138285809Sscottl bit32 sysIntsActive 139285809Sscottl ); 140285809Sscottl 141285809Sscottl 142285809SscottlosGLOBAL FORCEINLINE void 143285809SscottltiCOMInterruptEnable( 144285809Sscottl tiRoot_t * tiRoot, 145285809Sscottl bit32 channelNum); 146285809Sscottl 147285809SscottlosGLOBAL void tiCOMFrameReadBlock( 148285809Sscottl tiRoot_t *tiRoot, 149285809Sscottl void *agFrame, 150285809Sscottl bit32 FrameOffset, 151285809Sscottl void *FrameBuffer, 152285809Sscottl bit32 FrameBufLen ); 153285809SscottlosGLOBAL bit32 tiCOMEncryptGetInfo( 154285809Sscottl tiRoot_t *tiRoot); 155285809Sscottl 156285809SscottlosGLOBAL bit32 tiCOMEncryptSetMode( 157285809Sscottl tiRoot_t *tiRoot, 158285809Sscottl bit32 securityCipherMode 159285809Sscottl ); 160285809Sscottl 161285809SscottlosGLOBAL bit32 tiCOMSetControllerConfig ( 162285809Sscottl tiRoot_t *tiRoot, 163285809Sscottl bit32 modePage, 164285809Sscottl bit32 length, 165285809Sscottl void *buffer, 166285809Sscottl void *context 167285809Sscottl ); 168285809Sscottl 169285809SscottlosGLOBAL bit32 tiCOMGetControllerConfig( 170285809Sscottl tiRoot_t *tiRoot, 171285809Sscottl bit32 modePage, 172285809Sscottl bit32 flag, 173285809Sscottl void *context 174285809Sscottl ); 175285809Sscottl 176285809Sscottl 177285809SscottlosGLOBAL bit32 tiCOMEncryptDekAdd( 178285809Sscottl tiRoot_t *tiRoot, 179285809Sscottl bit32 kekIndex, 180285809Sscottl bit32 dekTableSelect, 181285809Sscottl bit32 dekAddrHi, 182285809Sscottl bit32 dekAddrLo, 183285809Sscottl bit32 dekIndex, 184285809Sscottl bit32 dekNumberOfEntries, 185285809Sscottl bit32 dekBlobFormat, 186285809Sscottl bit32 dekTableKeyEntrySize 187285809Sscottl ); 188285809Sscottl 189285809SscottlosGLOBAL bit32 tiCOMEncryptDekInvalidate( 190285809Sscottl tiRoot_t *tiRoot, 191285809Sscottl bit32 dekTable, 192285809Sscottl bit32 dekIndex 193285809Sscottl ); 194285809Sscottl 195285809Sscottl 196285809SscottlosGLOBAL bit32 tiCOMEncryptKekAdd( 197285809Sscottl tiRoot_t *tiRoot, 198285809Sscottl bit32 kekIndex, 199285809Sscottl bit32 wrapperKekIndex, 200285809Sscottl bit32 blobFormat, 201285809Sscottl tiEncryptKekBlob_t *encryptKekBlob 202285809Sscottl ); 203285809Sscottl 204285809SscottlosGLOBAL tiDeviceHandle_t * 205285809SscottltiINIGetExpDeviceHandleBySasAddress( 206285809Sscottl tiRoot_t * tiRoot, 207285809Sscottl tiPortalContext_t * tiPortalContext, 208285809Sscottl bit32 sas_addr_hi, 209285809Sscottl bit32 sas_addr_lo, 210285809Sscottl bit32 maxDevs 211285809Sscottl ); 212285809Sscottl 213285809Sscottl 214285809Sscottl#ifdef HIALEAH_ENCRYPTION 215285809SscottlosGLOBAL bit32 tiCOMEncryptHilSet(tiRoot_t *tiRoot ); 216285809Sscottl#endif /* HIALEAH_ENCRYPTION */ 217285809Sscottl 218285809SscottlosGLOBAL bit32 tiCOMEncryptKekStore( 219285809Sscottl tiRoot_t *tiRoot, 220285809Sscottl bit32 kekIndex 221285809Sscottl ); 222285809Sscottl 223285809SscottlosGLOBAL bit32 tiCOMEncryptKekLoad( 224285809Sscottl tiRoot_t *tiRoot, 225285809Sscottl bit32 kekIndex 226285809Sscottl ); 227285809Sscottl 228285809SscottlosGLOBAL bit32 tiCOMEncryptSelfTest( 229285809Sscottl tiRoot_t *tiRoot, 230285809Sscottl bit32 type, 231285809Sscottl bit32 length, 232285809Sscottl void *TestDescriptor 233285809Sscottl ); 234285809Sscottl 235285809SscottlosGLOBAL bit32 tiCOMSetOperator( 236285809Sscottl tiRoot_t *tiRoot, 237285809Sscottl bit32 flag, 238285809Sscottl void *cert 239285809Sscottl ); 240285809Sscottl 241285809SscottlosGLOBAL bit32 tiCOMGetOperator( 242285809Sscottl tiRoot_t *tiRoot, 243285809Sscottl bit32 option, 244285809Sscottl bit32 AddrHi, 245285809Sscottl bit32 AddrLo 246285809Sscottl ); 247285809Sscottl 248285809SscottlosGLOBAL bit32 tiCOMOperatorManagement( 249285809Sscottl tiRoot_t *tiRoot, 250285809Sscottl bit32 flag, 251285809Sscottl bit8 role, 252285809Sscottl tiID_t *idString, 253285809Sscottl tiEncryptKekBlob_t *kekBlob 254285809Sscottl ); 255285809Sscottl 256285809Sscottl/* 257285809Sscottl * PMC-Sierra Management IOCTL module 258285809Sscottl */ 259285809SscottlosGLOBAL bit32 tiCOMMgntIOCTL( 260285809Sscottl tiRoot_t *tiRoot, 261285809Sscottl tiIOCTLPayload_t *agIOCTLPayload, 262285809Sscottl void *agParam1, 263285809Sscottl void *agParam2, 264285809Sscottl void *agParam3 265285809Sscottl ); 266285809Sscottl 267285809SscottlosGLOBAL void ostiCOMMgntIOCTLRsp( 268285809Sscottl tiRoot_t *tiRoot, 269285809Sscottl bit32 status 270285809Sscottl ); 271285809Sscottl 272285809SscottlosGLOBAL void ostiRegDumpIOCTLRsp( 273285809Sscottl tiRoot_t *tiRoot, 274285809Sscottl bit32 status 275285809Sscottl ); 276285809Sscottl 277285809SscottlosGLOBAL void ostiSetNVMDIOCTLRsp( 278285809Sscottl tiRoot_t *tiRoot, 279285809Sscottl bit32 status 280285809Sscottl ); 281285809Sscottl 282285809SscottlosGLOBAL void ostiGetPhyProfileIOCTLRsp( 283285809Sscottl tiRoot_t *tiRoot, 284285809Sscottl bit32 status 285285809Sscottl ); 286285809Sscottl 287285809SscottlosGLOBAL void ostiGetNVMDIOCTLRsp( 288285809Sscottl tiRoot_t *tiRoot, 289285809Sscottl bit32 status 290285809Sscottl ); 291285809SscottlosGLOBAL bit32 tiCOMGetPortInfo( 292285809Sscottl tiRoot_t *tiRoot, 293285809Sscottl tiPortalContext_t *portalContext, 294285809Sscottl tiPortInfo_t *tiPortInfo 295285809Sscottl ); 296285809Sscottl 297285809SscottlosGLOBAL void ostiSendSMPIOCTLRsp( 298285809Sscottl tiRoot_t *tiRoot, 299285809Sscottl bit32 status 300285809Sscottl ); 301285809Sscottl 302285809SscottlosGLOBAL void ostiGenEventIOCTLRsp( 303285809Sscottl tiRoot_t *tiRoot, 304285809Sscottl bit32 status 305285809Sscottl ); 306285809Sscottl 307285809SscottlosGLOBAL void 308285809SscottlostiGetDeviceInfoIOCTLRsp( 309285809Sscottl tiRoot_t *tiRoot, 310285809Sscottl bit32 status, 311285809Sscottl void *param 312285809Sscottl ); 313285809Sscottl 314285809SscottlosGLOBAL void 315285809SscottlostiGetIoErrorStatsIOCTLRsp( 316285809Sscottl tiRoot_t *tiRoot, 317285809Sscottl bit32 status, 318285809Sscottl void *param 319285809Sscottl ); 320285809Sscottl 321285809SscottlosGLOBAL void 322285809SscottlostiGetIoEventStatsIOCTLRsp( 323285809Sscottl tiRoot_t *tiRoot, 324285809Sscottl bit32 status, 325285809Sscottl void *param 326285809Sscottl ); 327285809Sscottl 328285809SscottlosGLOBAL void 329285809SscottlostiGetForensicDataIOCTLRsp( 330285809Sscottl tiRoot_t *tiRoot, 331285809Sscottl bit32 status, 332285809Sscottl void *param 333285809Sscottl ); 334285809Sscottl 335285809Sscottl 336285809Sscottl#ifdef SPC_ENABLE_PROFILE 337285809SscottlosGLOBAL void ostiFWProfileIOCTLRsp( 338285809Sscottl tiRoot_t *tiRoot, 339285809Sscottl bit32 status, 340285809Sscottl bit32 len 341285809Sscottl ); 342285809Sscottl#endif 343285809Sscottl 344285809Sscottl/***************************************************************************** 345285809Sscottl * INITIATOR SPECIFIC APIs 346285809Sscottl *****************************************************************************/ 347285809Sscottl 348285809Sscottl/* 349285809Sscottl * Session management module. 350285809Sscottl */ 351285809SscottlosGLOBAL bit32 tiINIGetExpander( 352285809Sscottl tiRoot_t * tiRoot, 353285809Sscottl tiPortalContext_t * tiPortalContext, 354285809Sscottl tiDeviceHandle_t * tiDev, 355285809Sscottl tiDeviceHandle_t ** tiExp 356285809Sscottl ); 357285809SscottlosGLOBAL bit32 tiINIGetDeviceHandles( 358285809Sscottl tiRoot_t *tiRoot, 359285809Sscottl tiPortalContext_t *portalContext, 360285809Sscottl tiDeviceHandle_t *agDev[], 361285809Sscottl bit32 maxDevs 362285809Sscottl ); 363285809Sscottl 364285809SscottlosGLOBAL bit32 tiINIGetDeviceHandlesForWinIOCTL( 365285809Sscottl tiRoot_t *tiRoot, 366285809Sscottl tiPortalContext_t *portalContext, 367285809Sscottl tiDeviceHandle_t *agDev[], 368285809Sscottl bit32 maxDevs 369285809Sscottl ); 370285809Sscottl 371285809SscottlosGLOBAL void tiIniGetDirectSataSasAddr(tiRoot_t * tiRoot, bit32 phyId, bit8 **sasAddressHi, bit8 **sasAddressLo); 372285809SscottlosGLOBAL bit32 tiINIDiscoverTargets( 373285809Sscottl tiRoot_t *tiRoot, 374285809Sscottl tiPortalContext_t *portalContext, 375285809Sscottl bit32 option 376285809Sscottl ); 377285809Sscottl 378285809SscottlosGLOBAL bit32 tiINILogin( 379285809Sscottl tiRoot_t *tiRoot, 380285809Sscottl tiDeviceHandle_t *tiDeviceHandle 381285809Sscottl ); 382285809Sscottl 383285809SscottlosGLOBAL bit32 tiINILogout( 384285809Sscottl tiRoot_t *tiRoot, 385285809Sscottl tiDeviceHandle_t *tiDeviceHandle 386285809Sscottl ); 387285809Sscottl 388285809SscottlosGLOBAL bit32 tiINIGetDeviceInfo( 389285809Sscottl tiRoot_t *tiRoot, 390285809Sscottl tiDeviceHandle_t *tiDeviceHandle, 391285809Sscottl tiDeviceInfo_t *tiDeviceInfo); 392285809Sscottl 393285809Sscottl/* 394285809Sscottl * Transport recovery module. 395285809Sscottl */ 396285809SscottlosGLOBAL void tiINITransportRecovery( 397285809Sscottl tiRoot_t *tiRoot, 398285809Sscottl tiDeviceHandle_t *tiDeviceHandle 399285809Sscottl ); 400285809Sscottl 401285809SscottlosGLOBAL bit32 tiINITaskManagement ( 402285809Sscottl tiRoot_t *tiRoot, 403285809Sscottl tiDeviceHandle_t *tiDeviceHandle, 404285809Sscottl bit32 task, 405285809Sscottl tiLUN_t *lun, 406285809Sscottl tiIORequest_t *taskTag, 407285809Sscottl tiIORequest_t *currentTaskTag 408285809Sscottl ); 409285809SscottlosGLOBAL bit32 tiINISMPStart( 410285809Sscottl tiRoot_t *tiRoot, 411285809Sscottl tiIORequest_t *tiIORequest, 412285809Sscottl tiDeviceHandle_t *tiDeviceHandle, 413285809Sscottl tiSMPFrame_t *tiScsiRequest, 414285809Sscottl void *tiSMPBody, 415285809Sscottl bit32 interruptContext 416285809Sscottl ); 417285809Sscottl/* 418285809Sscottl * I/O module. 419285809Sscottl */ 420285809SscottlosGLOBAL bit32 tiINIIOStart( 421285809Sscottl tiRoot_t *tiRoot, 422285809Sscottl tiIORequest_t *tiIORequest, 423285809Sscottl tiDeviceHandle_t *tiDeviceHandle, 424285809Sscottl tiScsiInitiatorRequest_t *tiScsiRequest, 425285809Sscottl void *tiRequestBody, 426285809Sscottl bit32 interruptContext 427285809Sscottl ); 428285809Sscottl 429285809SscottlosGLOBAL void tiINIDebugDumpIO( 430285809Sscottl tiRoot_t *tiRoot, 431285809Sscottl tiIORequest_t *tiIORequest 432285809Sscottl ); 433285809Sscottl 434285809SscottlosGLOBAL bit32 tiINIIOStartDif( 435285809Sscottl tiRoot_t *tiRoot, 436285809Sscottl tiIORequest_t *tiIORequest, 437285809Sscottl tiDeviceHandle_t *tiDeviceHandle, 438285809Sscottl tiScsiInitiatorRequest_t *tiScsiRequest, 439285809Sscottl void *tiRequestBody, 440285809Sscottl bit32 interruptContext, 441285809Sscottl tiDif_t *difOption 442285809Sscottl ); 443285809SscottlosGLOBAL bit32 tiINISuperIOStart ( 444285809Sscottl tiRoot_t *tiRoot, 445285809Sscottl tiIORequest_t *tiIORequest, 446285809Sscottl tiDeviceHandle_t *tiDeviceHandle, 447285809Sscottl tiSuperScsiInitiatorRequest_t *tiScsiRequest, 448285809Sscottl void *tiRequestBody, 449285809Sscottl bit32 interruptContext 450285809Sscottl ); 451285809Sscottl 452285809Sscottl#ifdef FAST_IO_TEST 453285809SscottlosGLOBAL void *tiINIFastIOPrepare( 454285809Sscottl tiRoot_t *tiRoot, 455285809Sscottl void *ioHandle, 456285809Sscottl agsaFastCommand_t *fc); 457285809Sscottl 458285809SscottlosGLOBAL void* 459285809SscottltiINIFastIOPrepare2( 460285809Sscottl tiRoot_t *tiRoot, 461285809Sscottl void *ioHandle, 462285809Sscottl agsaFastCommand_t *fc, 463285809Sscottl void *pMessage, 464285809Sscottl void *pRequest); 465285809Sscottl 466285809SscottlosGLOBAL bit32 tiINIFastIOSend(void *ioHandle); 467285809SscottlosGLOBAL bit32 tiINIFastIOCancel(void *ioHandle); 468285809Sscottl#endif 469285809Sscottl 470285809SscottlosGLOBAL bit32 tiCOMEncryptGetMode(tiRoot_t *tiRoot); 471285809SscottlosGLOBAL bit32 tiCOMEncryptSetOn_Off(tiRoot_t *tiRoot, bit32 On); 472285809Sscottl 473285809SscottlosGLOBAL bit32 tiInitDevEncrypt( 474285809Sscottl tiRoot_t *tiRoot, 475285809Sscottl void *tideviceptr ); 476285809Sscottl 477285809SscottlosGLOBAL bit32 tiTGTSuperIOStart ( 478285809Sscottl tiRoot_t *tiRoot, 479285809Sscottl tiIORequest_t *tiIORequest, 480285809Sscottl tiSuperScsiTargetRequest_t *tiScsiRequest 481285809Sscottl ); 482285809Sscottl 483285809SscottlosGLOBAL void tiINITimerTick( 484285809Sscottl tiRoot_t *tiRoot 485285809Sscottl ); 486285809Sscottl 487285809Sscottl 488285809SscottlosGLOBAL bit32 tiINIIOAbort( 489285809Sscottl tiRoot_t *tiRoot, 490285809Sscottl tiIORequest_t *taskTag 491285809Sscottl ); 492285809Sscottl 493285809SscottlosGLOBAL bit32 tiINIIOAbortAll( 494285809Sscottl tiRoot_t *tiRoot, 495285809Sscottl tiDeviceHandle_t *tiDeviceHandle 496285809Sscottl ); 497285809Sscottl/* 498285809Sscottl * Event Logging module 499285809Sscottl */ 500285809SscottlosGLOBAL bit32 tiINIReportErrorToEventLog( 501285809Sscottl tiRoot_t *tiRoot, 502285809Sscottl tiEVTData_t *agEventData 503285809Sscottl ); 504285809Sscottl 505285809Sscottl 506285809Sscottl/***************************************************************************** 507285809Sscottl * TARGET SPECIFIC APIs 508285809Sscottl *****************************************************************************/ 509285809Sscottl 510285809SscottlosGLOBAL void tiTGTTimerTick( 511285809Sscottl tiRoot_t *tiRoot 512285809Sscottl ); 513285809Sscottl 514285809SscottlosGLOBAL void *tiTGTSenseBufferGet( 515285809Sscottl tiRoot_t *tiRoot, 516285809Sscottl tiIORequest_t *tiIORequest, 517285809Sscottl bit32 length 518285809Sscottl ); 519285809Sscottl 520285809SscottlosGLOBAL void tiTGTSetResp( 521285809Sscottl tiRoot_t *tiRoot, 522285809Sscottl tiIORequest_t *tiIORequest, 523285809Sscottl bit32 dataSentLength, 524285809Sscottl bit8 ScsiStatus, 525285809Sscottl bit32 senseLength 526285809Sscottl ); 527285809Sscottl 528285809SscottlosGLOBAL bit32 tiTGTIOStart ( 529285809Sscottl tiRoot_t *tiRoot, 530285809Sscottl tiIORequest_t *tiIORequest, 531285809Sscottl bit32 dataOffset, 532285809Sscottl bit32 dataLength, 533285809Sscottl tiSgl_t *dataSGL, 534285809Sscottl void *sglVirtualAddr 535285809Sscottl ); 536285809Sscottl 537285809SscottlosGLOBAL bit32 tiTGTIOStartMirror ( 538285809Sscottl tiRoot_t *tiRoot, 539285809Sscottl tiIORequest_t *tiIORequest, 540285809Sscottl bit32 dataOffset, 541285809Sscottl bit32 dataLength, 542285809Sscottl tiSgl_t *dataSGL, 543285809Sscottl void *sglVirtualAddr, 544285809Sscottl tiSgl_t *dataSGLMirror, 545285809Sscottl void *sglVirtualAddrMirror 546285809Sscottl ); 547285809Sscottl 548285809SscottlosGLOBAL bit32 tiTGTIOStartDif ( 549285809Sscottl tiRoot_t *tiRoot, 550285809Sscottl tiIORequest_t *tiIORequest, 551285809Sscottl bit32 dataOffset, 552285809Sscottl bit32 dataLength, 553285809Sscottl tiSgl_t *dataSGL, 554285809Sscottl void *sglVirtualAddr, 555285809Sscottl tiDif_t *difOption 556285809Sscottl ); 557285809Sscottl 558285809Sscottl 559285809SscottlosGLOBAL bit32 tiTGTGetDeviceHandles( 560285809Sscottl tiRoot_t *tiRoot, 561285809Sscottl tiPortalContext_t *portalContext, 562285809Sscottl tiDeviceHandle_t *agDev[], 563285809Sscottl bit32 maxDevs 564285809Sscottl ); 565285809Sscottl 566285809SscottlosGLOBAL bit32 tiTGTGetDeviceInfo( 567285809Sscottl tiRoot_t *tiRoot, 568285809Sscottl tiDeviceHandle_t *tiDeviceHandle, 569285809Sscottl tiDeviceInfo_t *tiDeviceInfo); 570285809Sscottl 571285809SscottlosGLOBAL bit32 tiTGTIOAbort( 572285809Sscottl tiRoot_t *tiRoot, 573285809Sscottl tiIORequest_t *taskTag 574285809Sscottl ); 575285809Sscottl 576285809SscottlosGLOBAL bit32 tiTGTSendTmResp ( 577285809Sscottl tiRoot_t *tiRoot, 578285809Sscottl tiIORequest_t *tiTMRequest, 579285809Sscottl bit32 status 580285809Sscottl ); 581285809Sscottl 582285809Sscottlvoid tiPCI_TRIGGER( tiRoot_t *tiRoot); 583285809Sscottl 584285809Sscottlvoid tiComCountActiveIORequests( tiRoot_t *tiRoot); 585285809Sscottl 586285809Sscottl#endif /* TIAPI_H */ 587