FreeBSD kernel pms device code
ttdio.c File Reference
#include <osenv.h>
#include <ostypes.h>
#include <osdebug.h>
#include <sa.h>
#include <saapi.h>
#include <saosapi.h>
#include <titypes.h>
#include <ostiapi.h>
#include <tiapi.h>
#include <tiglobal.h>
#include <tdtypes.h>
#include <osstring.h>
#include <tdutil.h>
#include <tdsatypes.h>
#include <tdproto.h>
Include dependency graph for ttdio.c:

Go to the source code of this file.

Data Structures

struct  TDDebugTraceEntry_s
 
struct  TDDebugTrace_s
 

Macros

#define TD_DEBUG_IO_TRACE_BUFFER_MAX   1024
 
#define TD_DEBUG_TRACE(ttdsaXchg, oneDeviceData)
 

Typedefs

typedef struct TDDebugTraceEntry_s TDDebugTraceEntry_t
 
typedef struct TDDebugTrace_s TDDebugTrace_t
 

Functions

void TDTraceInit (void)
 
void TDTraceAdd (ttdsaXchg_t *ttdsaXchg, tdsaDeviceData_t *oneDeviceData)
 
osGLOBAL void ttdsaSSPReqReceived (agsaRoot_t *agRoot, agsaDevHandle_t *agDevHandle, agsaFrameHandle_t agFrameHandle, bit32 agInitiatorTag, bit32 parameter, bit32 agFrameLen)
 
void dumpCDB (bit8 *cdb)
 
osGLOBAL void tdsaProcessCDB (agsaSSPCmdInfoUnit_t *cmdIU, ttdsaXchg_t *ttdsaXchg)
 
osGLOBAL bit32 tiTGTIOStart (tiRoot_t *tiRoot, tiIORequest_t *tiIORequest, bit32 dataOffset, bit32 dataLength, tiSgl_t *dataSGL, void *sglVirtualAddr)
 
osGLOBAL bit32 ttdssIOPrepareSGL (tiRoot_t *tiRoot, tdIORequestBody_t *tdIORequestBody, tiSgl_t *tiSgl1, tiSgl_t *tiSgl2, void *sglVirtualAddr)
 
void dumpresp (bit8 *resp, bit32 len)
 
osGLOBAL bit32 ttdsaSendResp (agsaRoot_t *agRoot, ttdsaXchg_t *ttdsaXchg)
 
osGLOBAL void ttdsaIOCompleted (agsaRoot_t *agRoot, agsaIORequest_t *agIORequest, bit32 agIOStatus, bit32 agIOInfoLen, agsaFrameHandle_t agFrameHandle, bit32 agOtherInfo)
 
osGLOBAL void ttdsaTMProcess (tiRoot_t *tiRoot, ttdsaXchg_t *ttdsaXchg)
 
osGLOBAL bit32 tiTGTIOAbort (tiRoot_t *tiRoot, tiIORequest_t *taskTag)
 
osGLOBAL bit32 tiTGTIOAbortAll (tiRoot_t *tiRoot, tiDeviceHandle_t *tiDeviceHandle)
 
osGLOBAL bit32 tiTGTSendTmResp (tiRoot_t *tiRoot, tiIORequest_t *tiTMRequest, bit32 status)
 
osGLOBAL void * tiTGTSenseBufferGet (tiRoot_t *tiRoot, tiIORequest_t *tiIORequest, bit32 length)
 
osGLOBAL void tiTGTSetResp (tiRoot_t *tiRoot, tiIORequest_t *tiIORequest, bit32 dataSentLength, bit8 ScsiStatus, bit32 senseLength)
 
osGLOBAL bit32 tiTGTGetDeviceHandles (tiRoot_t *tiRoot, tiPortalContext_t *tiPortalContext, tiDeviceHandle_t *tiDev[], bit32 maxDevs)
 
osGLOBAL bit32 tiTGTGetDeviceInfo (tiRoot_t *tiRoot, tiDeviceHandle_t *tiDeviceHandle, tiDeviceInfo_t *tiDeviceInfo)
 
osGLOBAL void ttdssIOAbortedHandler (agsaRoot_t *agRoot, agsaIORequest_t *agIORequest, bit32 agIOStatus, bit32 agIOInfoLen, void *agParam, bit32 agOtherInfo)
 

Variables

TDDebugTrace_t TraceData
 

Detailed Description

RCSfile
ttdio.c,v

Copyright 2006 PMC-Sierra, Inc.

This file contains initiator IO related functions in TD layer

Definition in file ttdio.c.

Macro Definition Documentation

◆ TD_DEBUG_IO_TRACE_BUFFER_MAX

#define TD_DEBUG_IO_TRACE_BUFFER_MAX   1024

Definition at line 71 of file ttdio.c.

◆ TD_DEBUG_TRACE

#define TD_DEBUG_TRACE (   ttdsaXchg,
  oneDeviceData 
)

Definition at line 94 of file ttdio.c.

Typedef Documentation

◆ TDDebugTrace_t

◆ TDDebugTraceEntry_t

Function Documentation

◆ dumpCDB()

void dumpCDB ( bit8 cdb)

Definition at line 313 of file ttdio.c.

References TI_DBG4.

Referenced by tdsaProcessCDB().

Here is the caller graph for this function:

◆ dumpresp()

void dumpresp ( bit8 resp,
bit32  len 
)

Definition at line 735 of file ttdio.c.

References TI_DBG4.

Referenced by tiTGTSetResp(), and ttdsaSendResp().

Here is the caller graph for this function:

◆ tdsaProcessCDB()

◆ TDTraceAdd()

◆ TDTraceInit()

void TDTraceInit ( void  )

Definition at line 99 of file ttdio.c.

References osti_memset, and TraceData.

Referenced by ttdsaXchgInit().

Here is the caller graph for this function:

◆ tiTGTGetDeviceHandles()

osGLOBAL bit32 tiTGTGetDeviceHandles ( tiRoot_t tiRoot,
tiPortalContext_t tiPortalContext,
tiDeviceHandle_t tiDev[],
bit32  maxDevs 
)

◆ tiTGTGetDeviceInfo()

◆ tiTGTIOAbort()

◆ tiTGTIOAbortAll()

◆ tiTGTIOStart()

osGLOBAL bit32 tiTGTIOStart ( tiRoot_t tiRoot,
tiIORequest_t tiIORequest,
bit32  dataOffset,
bit32  dataLength,
tiSgl_t dataSGL,
void *  sglVirtualAddr 
)

◆ tiTGTSendTmResp()

◆ tiTGTSenseBufferGet()

osGLOBAL void * tiTGTSenseBufferGet ( tiRoot_t tiRoot,
tiIORequest_t tiIORequest,
bit32  length 
)

◆ tiTGTSetResp()

◆ ttdsaIOCompleted()

osGLOBAL void ttdsaIOCompleted ( agsaRoot_t agRoot,
agsaIORequest_t agIORequest,
bit32  agIOStatus,
bit32  agIOInfoLen,
agsaFrameHandle_t  agFrameHandle,
bit32  agOtherInfo 
)

Definition at line 826 of file ttdio.c.

References tdsaDeviceData_s::agDevHandle, agFALSE, tdIORequestBody_s::agIORequest, agNULL, ttdsaXchg_s::agRoot, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, AGSA_SSP_TGT_READ_GOOD_RESP, AGSA_SSP_TGT_WRITE_GOOD_RESP, tdIORequestBody_s::agSASRequestBody, ttdsaXchg_s::agSSPCmndIU, agsaSSPTargetRequest_s::agTag, agTRUE, agsaSSPCmdInfoUnit_s::cdb, agsaSSPTargetRequest_s::dataLength, ttdsaXchg_s::DeviceData, tdIORequestBody_s::EsglPageList, ttdsaXchg_s::id, ttdsaXchg_s::io_found, ttdsaXchg_s::IORequestBody, tdIORequestBody_s::IOType, ttdsaXchg_s::isTMRequest, agsaSSPTargetRequest_s::offset, OPEN_RETRY_RETRIES, agsaContext_s::osData, OSSA_IO_ABORT_RESET, OSSA_IO_ABORTED, OSSA_IO_DS_IN_RECOVERY, OSSA_IO_DS_NON_OPERATIONAL, OSSA_IO_FAILED, OSSA_IO_LINK_FAILURE, OSSA_IO_NO_DEVICE, OSSA_IO_NOT_VALID, OSSA_IO_OVERFLOW, OSSA_IO_PROG_ERROR, OSSA_IO_SUCCESS, OSSA_IO_TM_TAG_NOT_FOUND, OSSA_IO_UNDERFLOW, OSSA_IO_XFER_OPEN_RETRY_TIMEOUT, OSSA_IO_XFR_ERROR_DEK_KEY_CACHE_MISS, OSSA_IO_XFR_ERROR_DEK_KEY_TAG_MISMATCH, OSSA_IO_XFR_ERROR_DIF_APPLICATION_TAG_MISMATCH, OSSA_IO_XFR_ERROR_DIF_CRC_MISMATCH, OSSA_IO_XFR_ERROR_DIF_REFERENCE_TAG_MISMATCH, OSSA_MPI_ERR_IO_RESOURCE_UNAVAILABLE, ossaSSPCompleted(), ostiNextDataPhase(), ostiTargetIOCompleted(), ostiTargetIOError(), ostiTargetTmCompleted(), ttdsaXchg_s::readRspCollapsed, ttdsaXchg_s::responseSent, ttdsaXchg_s::retries, tdIORequestBody_s::SAS, saSSPStart(), agsaContext_s::sdkData, agsaSASRequestBody_u::sspTargetReq, status, ttdsaXchg_s::statusSent, ttdsaXchg_s::tag, tdIORequestBody_s::TargetIO, TD_DEBUG_TRACE, TD_XCHG_CONTEXT_NO_IO_COMPLETED, TD_XCHG_GET_STATE, TD_XCHG_STATE_ACTIVE, TD_XCHG_STATE_INACTIVE, tiRoot::tdData, tiIORequest::tdData, tdsaFreeEsglPages(), TI_DBG1, TI_DBG2, TI_DBG4, TI_DBG6, tiDetailAborted, tiDetailAbortReset, tiDetailDekKeyCacheMiss, tiDetailDifAppTagMismatch, tiDetailDifCrcMismatch, tiDetailDifRefTagMismatch, tiDetailOtherError, tiIODifError, tiIOEncryptError, tiIOFailed, tiIOOverRun, tdIORequestBody_s::tiIORequest, tiIOSuccess, tiIOUnderRun, ttdsaXchg_s::tiRoot, tdIORequestBody_s::transport, ttdsaSendResp(), ttdsaXchgFreeStruct(), ttdsaXchg_s::usedEsgl, ttdsaXchg_s::wrtRspCollapsed, and ttdsaXchg_s::XchType.

Referenced by ttdsaXchgInit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ttdsaSendResp()

◆ ttdsaSSPReqReceived()

osGLOBAL void ttdsaSSPReqReceived ( agsaRoot_t agRoot,
agsaDevHandle_t agDevHandle,
agsaFrameHandle_t  agFrameHandle,
bit32  agInitiatorTag,
bit32  parameter,
bit32  agFrameLen 
)

◆ ttdsaTMProcess()

◆ ttdssIOAbortedHandler()

osGLOBAL void ttdssIOAbortedHandler ( agsaRoot_t agRoot,
agsaIORequest_t agIORequest,
bit32  agIOStatus,
bit32  agIOInfoLen,
void *  agParam,
bit32  agOtherInfo 
)

Definition at line 2369 of file ttdio.c.

References agsaContext_s::osData, OSSA_IO_ABORTED, ostiTargetIOError(), TI_DBG1, tiDetailAborted, tiIOFailed, tdIORequestBody_s::tiIORequest, and tdsaRootOsData_s::tiRoot.

Here is the call graph for this function:

◆ ttdssIOPrepareSGL()

Variable Documentation

◆ TraceData

TDDebugTrace_t TraceData

Definition at line 97 of file ttdio.c.

Referenced by TDTraceAdd(), and TDTraceInit().