FreeBSD kernel pms device code
tdport.c File Reference
Include dependency graph for tdport.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
bit32 tiCOMConfigureSgpio (tiRoot_t *tiRoot, bit8 enableSgpio)
 
osGLOBAL void tdsaGetSwConfigParams (tiRoot_t *tiRoot)
 
osGLOBAL void tdsaParseLinkRateMode (tiRoot_t *tiRoot, bit32 index, bit32 LinkRateRead, bit32 ModeRead, bit32 OpticalModeRead, bit32 LinkRate, bit32 Mode, bit32 OpticalMode)
 
osGLOBAL void tdsaGetHwConfigParams (tiRoot_t *tiRoot)
 
osGLOBAL void tdsaGetCardPhyParams (tiRoot_t *tiRoot)
 
osGLOBAL void tdsaGetGlobalPhyParams (tiRoot_t *tiRoot)
 
osGLOBAL void tdsaGetPortParams (tiRoot_t *tiRoot)
 
osGLOBAL bit32 tiCOMPortInit (tiRoot_t *tiRoot, bit32 sysIntsActive)
 
static bit32 SendSgpioRequest (tiRoot_t *tiRoot, bit8 regType, bit8 regIndex, bit8 regCount, bit32 *writeData)
 
osGLOBAL bit32 tiCOMPortStart (tiRoot_t *tiRoot, bit32 portID, tiPortalContext_t *portalContext, bit32 option)
 
osGLOBAL bit32 tiCOMPortStop (tiRoot_t *tiRoot, tiPortalContext_t *portalContext)
 
osGLOBAL bit32 tiCOMGetPortInfo (tiRoot_t *tiRoot, tiPortalContext_t *portalContext, tiPortInfo_t *tiPortInfo)
 
osGLOBAL bit32 tiCOMSetControllerConfig (tiRoot_t *tiRoot, bit32 modePage, bit32 length, void *buffer, void *context)
 
osGLOBAL bit32 tiCOMGetControllerConfig (tiRoot_t *tiRoot, bit32 modePage, bit32 flag, void *context)
 
osGLOBAL bit32 tiCOMEncryptGetInfo (tiRoot_t *tiRoot)
 
osGLOBAL bit32 tiCOMEncryptSetMode (tiRoot_t *tiRoot, bit32 securityCipherMode)
 
osGLOBAL bit32 tiCOMEncryptDekAdd (tiRoot_t *tiRoot, bit32 kekIndex, bit32 dekTableSelect, bit32 dekAddrHi, bit32 dekAddrLo, bit32 dekIndex, bit32 dekNumberOfEntries, bit32 dekBlobFormat, bit32 dekTableKeyEntrySize)
 
osGLOBAL bit32 tiCOMEncryptDekInvalidate (tiRoot_t *tiRoot, bit32 dekTable, bit32 dekIndex)
 
osGLOBAL bit32 tiCOMEncryptKekAdd (tiRoot_t *tiRoot, bit32 kekIndex, bit32 wrapperKekIndex, bit32 blobFormat, tiEncryptKekBlob_t *encryptKekBlob)
 
osGLOBAL bit32 tiCOMEncryptKekStore (tiRoot_t *tiRoot, bit32 kekIndex)
 
osGLOBAL bit32 tiCOMEncryptKekLoad (tiRoot_t *tiRoot, bit32 kekIndex)
 
osGLOBAL bit32 tiCOMEncryptSelfTest (tiRoot_t *tiRoot, bit32 type, bit32 length, void *TestDescriptor)
 
osGLOBAL bit32 tiCOMSetOperator (tiRoot_t *tiRoot, bit32 flag, void *cert)
 
osGLOBAL bit32 tiCOMGetOperator (tiRoot_t *tiRoot, bit32 option, bit32 AddrHi, bit32 AddrLo)
 
osGLOBAL bit32 tiCOMOperatorManagement (tiRoot_t *tiRoot, bit32 flag, bit8 role, tiID_t *idString, tiEncryptKekBlob_t *kekBlob)
 
osGLOBAL void tdssAddSASToSharedcontext (tdsaPortContext_t *tdsaPortContext_Instance, agsaRoot_t *agRoot, agsaDevHandle_t *agDevHandle, tdsaSASSubID_t *agSASSubID, bit32 registered, bit8 phyID, bit32 flag)
 
osGLOBAL void tdssRemoveSASFromSharedcontext (tdsaPortContext_t *tdsaPortContext_Ins, tdsaDeviceData_t *tdsaDeviceData_Ins, agsaRoot_t *agRoot)
 
osGLOBAL void tdssRemoveAllDevicelistFromPortcontext (tdsaPortContext_t *PortContext_Ins, agsaRoot_t *agRoot)
 
FORCEINLINE bit32 tdsaRotateQnumber (tiRoot_t *tiRoot, tdsaDeviceData_t *oneDeviceData)
 
osGLOBAL bit32 tdsaRotateQnumber1 (tiRoot_t *tiRoot, tdsaDeviceData_t *oneDeviceData)
 
void t_MacroCheck (agsaRoot_t *agRoot)
 

Variables

bit32 gSSC_Disable = 0
 
bit32 volatile sgpioResponseSet = 0
 

Detailed Description

tdport.c This file contains port realted functions such as tiCOMPortStart()

Definition in file tdport.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ SendSgpioRequest()

◆ t_MacroCheck()

void t_MacroCheck ( agsaRoot_t agRoot)

◆ tdsaGetCardPhyParams()

osGLOBAL void tdsaGetCardPhyParams ( tiRoot_t tiRoot)

◆ tdsaGetGlobalPhyParams()

osGLOBAL void tdsaGetGlobalPhyParams ( tiRoot_t tiRoot)

◆ tdsaGetHwConfigParams()

◆ tdsaGetPortParams()

osGLOBAL void tdsaGetPortParams ( tiRoot_t tiRoot)

Definition at line 3768 of file tdport.c.

References agNULL, DEFAULT_KEY_BUFFER_SIZE, osti_memset, osti_strncmp, osti_strtoul, ostiGetTransportParam(), tiRoot::tdData, tdsaRoot_s::tdsaAllShared, TI_DBG6, and tiSuccess.

Here is the call graph for this function:

◆ tdsaGetSwConfigParams()

osGLOBAL void tdsaGetSwConfigParams ( tiRoot_t tiRoot)

Definition at line 123 of file tdport.c.

References agFALSE, agNULL, AGSA_MAX_INBOUND_Q, AGSA_MAX_OUTBOUND_Q, agTRUE, DEFAULT_EVENT_LOG_OPTION, DEFAULT_INBOUND_QUEUE_ELE_SIZE, DEFAULT_INBOUND_QUEUE_PRIORITY, DEFAULT_INBOUND_QUEUE_SIZE, DEFAULT_KEY_BUFFER_SIZE, DEFAULT_MAX_ACTIVE_IOS, DEFAULT_MAX_DEV, DEFAULT_NUM_INBOUND_QUEUE, DEFAULT_NUM_OUTBOUND_QUEUE, DEFAULT_NUM_REG_CLIENTS, DEFAULT_OUTBOUND_INTERRUPT_ENABLE, DEFAULT_OUTBOUND_QUEUE_ELE_SIZE, DEFAULT_OUTBOUND_QUEUE_INTERRUPT_COUNT, DEFAULT_OUTBOUND_QUEUE_INTERRUPT_DELAY, DEFAULT_OUTBOUND_QUEUE_SIZE, DEFAULT_QUEUE_OPTION, DEFAULT_SMP_TIMEOUT, agsaSwConfig_s::disableMDF, agsaSwConfig_s::enableDIF, agsaSwConfig_s::enableEncryption, agsaSwConfig_s::eventLog1Option, agsaSwConfig_s::eventLog2Option, agsaSwConfig_s::fatalErrorInterruptEnable, agsaSwConfig_s::fatalErrorInterruptVector, agsaSwConfig_s::FWConfig, HOST_EVENT_LOG_SIZE, agsaSwConfig_s::hostDirectAccessMode, agsaSwConfig_s::hostDirectAccessSupport, agsaQueueConfig_s::iqHighPriorityProcessingDepth, agsaQueueConfig_s::iqNormalPriorityProcessingDepth, IT_NEXUS_TIMEOUT, agsaSwConfig_s::maxActiveIOs, agsaSwConfig_s::mpiContextTable, agsaSwConfig_s::mpiContextTablelen, tdsaContext_s::MpiOverride, agsaMPIContext_s::MPITableType, agsaSwConfig_s::numberOfEventRegClients, agsaSwConfig_s::numDevHandles, agsaQueueConfig_s::numInboundQueues, agsaQueueConfig_s::numOutboundQueues, agsaMPIContext_s::offset, osti_memset, osti_sprintf, osti_strncmp, osti_strtoul, ostiGetTransportParam(), agsaSwConfig_s::param1, agsaSwConfig_s::param2, PORT_RECOVERY_TIMEOUT, agsaSwConfig_s::sizefEventLog1, agsaSwConfig_s::sizefEventLog2, agsaSwConfig_s::smpReqTimeout, STP_IDLE_TIME, tdsaContext_s::SwConfig, tiRoot::tdData, tdsaRoot_s::tdsaAllShared, TI_DBG1, TI_DBG2, TI_DBG6, tiSuccess, and agsaMPIContext_s::value.

Referenced by tdsaQueueConfigInit(), and tiCOMPortInit().

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

◆ tdsaParseLinkRateMode()

osGLOBAL void tdsaParseLinkRateMode ( tiRoot_t tiRoot,
bit32  index,
bit32  LinkRateRead,
bit32  ModeRead,
bit32  OpticalModeRead,
bit32  LinkRate,
bit32  Mode,
bit32  OpticalMode 
)

Definition at line 2450 of file tdport.c.

References agTRUE, index, TD_ASSERT, tiRoot::tdData, tdsaRoot_s::tdsaAllShared, TI_DBG1, TI_DBG2, TI_DBG3, and tIsSPCV12or6G.

Referenced by tdsaGetCardPhyParams(), and tdsaGetGlobalPhyParams().

Here is the caller graph for this function:

◆ tdsaRotateQnumber()

◆ tdsaRotateQnumber1()

◆ tdssAddSASToSharedcontext()

osGLOBAL void tdssAddSASToSharedcontext ( tdsaPortContext_t tdsaPortContext_Instance,
agsaRoot_t agRoot,
agsaDevHandle_t agDevHandle,
tdsaSASSubID_t agSASSubID,
bit32  registered,
bit8  phyID,
bit32  flag 
)

Definition at line 6487 of file tdport.c.

References tdsaDeviceData_s::agContext, tdsaDeviceData_s::agDevHandle, tdsaDeviceData_s::agDeviceInfo, agFALSE, agNULL, tdsaPortContext_s::agPortContext, tdsaDeviceData_s::agRoot, agTRUE, tdsaPortContext_s::Count, DEFAULT_SMP_TIMEOUT, DEVICE_IS_SATA_DEVICE, DEVICE_IS_SMP_TARGET, DEVICE_IS_SSP_TARGET, DEVICE_IS_STP_TARGET, tdsaDeviceData_s::DeviceType, DEVINFO_PUT_DEV_S_RATE, DEVINFO_PUT_FBS, DEVINFO_PUT_FLAG, DEVINFO_PUT_ITNEXUSTO, DEVINFO_PUT_SAS_ADDRESSHI, DEVINFO_PUT_SAS_ADDRESSLO, DEVINFO_PUT_SMPTO, tdsaDeviceData_s::directlyAttached, agsaDeviceInfo_s::flag, tdList_s::flink, tdsaContext_s::FreeDeviceList, tdsaDeviceData_s::id, tdsaPortContext_s::id, tdsaDeviceData_s::initiator_ssp_stp_smp, tdsaSASSubID_s::initiator_ssp_stp_smp, tdsaDeviceData_s::InQID, tdsaContext_s::itNexusTimeout, tdsaPortContext_s::LinkRate, tdsaContext_s::MainDeviceList, tdsaDeviceData_s::MainLink, tdsaContext_s::MainPortContextList, agsaQueueConfig_s::numInboundQueues, agsaQueueConfig_s::numOutboundQueues, agsaContext_s::osData, tdsaDeviceData_s::OutQID, tdsaDeviceData_s::phyID, tdsaContext_s::QueueConfig, tdsaDeviceData_s::registered, saRegisterNewDevice(), SAS_DEVICE_TYPE, TDSASAddressID_s::sasAddressHi, tdsaSASSubID_s::sasAddressHi, tdsaDeviceData_s::SASAddressID, TDSASAddressID_s::sasAddressLo, tdsaSASSubID_s::sasAddressLo, agsaContext_s::sdkData, tdsaContext_s::sflag, tdsaDeviceData_s::target_ssp_stp_smp, tdsaSASSubID_s::target_ssp_stp_smp, TD_DEVICE_LOCK, TD_OPERATION_INITIATOR, TD_OPERATION_TARGET, TD_SAS_DEVICE, TD_XFER_RDY_PRIORTY_DEVICE_FLAG, tiRoot::tdData, TDLIST_DEQUEUE_FROM_HEAD, TDLIST_ENQUEUE_AT_TAIL, TDLIST_NOT_EMPTY, TDLIST_OBJECT_BASE, tdsaDeviceData_s::tdPortContext, tdsaRoot_s::tdsaAllShared, tdsaSingleThreadedEnter(), tdsaSingleThreadedLeave(), TI_DBG1, TI_DBG3, TI_DBG4, tdsaRootOsData_s::tiRoot, and tdsaDeviceData_s::valid.

Referenced by ossaDeviceHandleAccept(), and ossaHwCB().

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

◆ tdssRemoveAllDevicelistFromPortcontext()

◆ tdssRemoveSASFromSharedcontext()

◆ tiCOMConfigureSgpio()

bit32 tiCOMConfigureSgpio ( tiRoot_t tiRoot,
bit8  enableSgpio 
)

◆ tiCOMEncryptDekAdd()

osGLOBAL bit32 tiCOMEncryptDekAdd ( tiRoot_t tiRoot,
bit32  kekIndex,
bit32  dekTableSelect,
bit32  dekAddrHi,
bit32  dekAddrLo,
bit32  dekIndex,
bit32  dekNumberOfEntries,
bit32  dekBlobFormat,
bit32  dekTableKeyEntrySize 
)

◆ tiCOMEncryptDekInvalidate()

◆ tiCOMEncryptGetInfo()

◆ tiCOMEncryptKekAdd()

osGLOBAL bit32 tiCOMEncryptKekAdd ( tiRoot_t tiRoot,
bit32  kekIndex,
bit32  wrapperKekIndex,
bit32  blobFormat,
tiEncryptKekBlob_t encryptKekBlob 
)

◆ tiCOMEncryptKekLoad()

osGLOBAL bit32 tiCOMEncryptKekLoad ( tiRoot_t tiRoot,
bit32  kekIndex 
)

◆ tiCOMEncryptKekStore()

osGLOBAL bit32 tiCOMEncryptKekStore ( tiRoot_t tiRoot,
bit32  kekIndex 
)

◆ tiCOMEncryptSelfTest()

osGLOBAL bit32 tiCOMEncryptSelfTest ( tiRoot_t tiRoot,
bit32  type,
bit32  length,
void *  TestDescriptor 
)

◆ tiCOMEncryptSetMode()

◆ tiCOMGetControllerConfig()

osGLOBAL bit32 tiCOMGetControllerConfig ( tiRoot_t tiRoot,
bit32  modePage,
bit32  flag,
void *  context 
)

◆ tiCOMGetOperator()

osGLOBAL bit32 tiCOMGetOperator ( tiRoot_t tiRoot,
bit32  option,
bit32  AddrHi,
bit32  AddrLo 
)

◆ tiCOMGetPortInfo()

◆ tiCOMOperatorManagement()

osGLOBAL bit32 tiCOMOperatorManagement ( tiRoot_t tiRoot,
bit32  flag,
bit8  role,
tiID_t idString,
tiEncryptKekBlob_t kekBlob 
)

◆ tiCOMPortInit()

osGLOBAL bit32 tiCOMPortInit ( tiRoot_t tiRoot,
bit32  sysIntsActive 
)

Definition at line 3862 of file tdport.c.

References aap1array, agsaFwImg_s::aap1Img, agsaFwImg_s::aap1Len, agsaMemoryRequirement_s::agMemory, agNULL, tdsaContext_s::agRootInt, tdsaContext_s::agRootNonInt, AGSA_CACHED_DMA_MEM, AGSA_CACHED_MEM, AGSA_DMA_MEM, AGSA_NUM_MEM_CHUNKS, AGSA_RC_FAILURE, AGSA_RC_VERSION_INCOMPATIBLE, agTRUE, dmMem_t::alignment, agsaMem_s::alignment, smMem_t::alignment, tiMem::alignment, dmMemoryRequirement_t::count, agsaMemoryRequirement_s::count, smMemoryRequirement_t::count, tiLoLevelMem::count, tdsaContext_s::currentOperation, DEFAULT_INBOUND_QUEUE_PRIORITY, DM_RC_FAILURE, DM_RC_VERSION_INCOMPATIBLE, dmGetRequirements(), dmInitialize(), dmMemoryRequirement_t::dmMemory, agsaQueueInbound_s::elementCount, agsaQueueOutbound_s::elementCount, agsaQueueInbound_s::elementSize, agsaQueueOutbound_s::elementSize, agsaSwConfig_s::fatalErrorInterruptVector, tiLoLevelOption::flag, tdsaContext_s::flags, tdsaPortStartInfo_s::flags, agsaSwConfig_s::FWConfig, agsaSwConfig_s::hostDirectAccessSupport, tdsaContext_s::HwConfig, ilaarray, agsaFwImg_s::ilaImg, agsaFwImg_s::ilaLen, tdsaContext_s::InboundQueueEleSize, tdsaContext_s::InboundQueuePriority, agsaQueueConfig_s::inboundQueues, tdsaContext_s::InboundQueueSize, agsaQueueOutbound_s::interruptCount, agsaQueueOutbound_s::interruptDelay, agsaQueueOutbound_s::interruptEnable, agsaQueueOutbound_s::interruptVectorIndex, ioparray, agsaFwImg_s::iopImg, agsaFwImg_s::iopLen, istrarray, agsaFwImg_s::istrImg, agsaFwImg_s::istrLen, agsaSwConfig_s::legacyInt_X, tiLoLevelResource::loLevelMem, tiLoLevelResource::loLevelOption, tdsaContext_s::loResource, agsaSwConfig_s::max_MSI_InterruptVectors, tiLoLevelOption::max_MSI_InterruptVectors, agsaSwConfig_s::max_MSIX_InterruptVectors, tiLoLevelOption::maxInterruptVectors, tiLoLevelMem::mem, dmMem_t::numElements, agsaMem_s::numElements, smMem_t::numElements, tiMem::numElements, agsaQueueConfig_s::numInboundQueues, agsaQueueConfig_s::numOutboundQueues, dmMem_t::osHandle, agsaMem_s::osHandle, smMem_t::osHandle, tiMem::osHandle, OSSA_EVENT_SOURCE_DEVICE_HANDLE_ADDED, OSSA_EVENT_SOURCE_DEVICE_HANDLE_REMOVED, ossaDeregisterDeviceHandleCB(), ossaDeviceRegistrationCB(), ossaHwRegReadConfig32(), osti_memcpy, osti_memset, tdsaContext_s::OutboundQueueEleSize, tdsaContext_s::OutboundQueueInterruptCount, tdsaContext_s::OutboundQueueInterruptDelay, tdsaContext_s::OutboundQueueInterruptEnable, agsaQueueConfig_s::outboundQueues, tdsaContext_s::OutboundQueueSize, agsaSwConfig_s::param1, agsaSwConfig_s::param2, agsaSwConfig_s::param3, agsaSwConfig_s::param4, agsaMem_s::phyAddrLower, agsaMem_s::phyAddrUpper, dmMem_t::physAddrLower, smMem_t::physAddrLower, tiMem::physAddrLower, dmMem_t::physAddrUpper, smMem_t::physAddrUpper, tiMem::physAddrUpper, tdssPortFlags_s::portInitialized, agsaSwConfig_s::PortRecoveryResetTimer, tdsaContext_s::Ports, agsaQueueInbound_s::priority, tdsaContext_s::QueueConfig, agsaQueueConfig_s::queueOption, tdsaContext_s::QueueOption, dmMem_t::reserved, agsaQueueInbound_s::reserved, agsaMem_s::reserved, smMem_t::reserved, tiMem::reserved, tdsaComMemFlags_s::resetInProgress, saEchoCommand(), saEncryptGetMode(), saGetControllerInfo(), saGetControllerStatus(), saGetRequirements(), saInitialize(), saRegisterEventCallback(), agsaContext_s::sdkData, dmMem_t::singleElementLength, agsaMem_s::singleElementLength, smMem_t::singleElementLength, tiMem::singleElementLength, SM_RC_FAILURE, SM_RC_VERSION_INCOMPATIBLE, smInitialize(), smMemoryRequirement_t::smMemory, tdsaContext_s::SMPQNum, spcv12g_ilaarray, spcv12g_ioparray, spcv12g_raaearray, spcv_aap1array, spcv_ilaarray, spcv_ioparray, agsaSwConfig_s::stallUsec, status, tdsaContext_s::SwConfig, tdsaComMemFlags_s::sysIntsActive, t_MacroCheck(), TD_MAX_NUM_PHYS, TD_OPERATION_TARGET, tiRoot::tdData, tdsaContext_s::tdDeviceIdVendId, tdsaContext_s::tdFWControlEx, tdsaRoot_s::tdsaAllShared, tdsaGetHwConfigParams(), tdsaGetSwConfigParams(), tdsaPrintHwConfig(), tdsaPrintSwConfig(), tdsaRotateQnumber(), tdsaContext_s::tdSubVendorId, TI_CACHED_DMA_MEM, TI_CACHED_MEM, TI_DBG1, TI_DBG2, TI_DBG3, TI_DBG6, TI_DMA_MEM, tiCOMConfigureSgpio(), tiError, tiIS_SPC, tiIS_SPC6V, tIsSPCV12G, tiSuccess, dmMem_t::totalLength, agsaMem_s::totalLength, smMem_t::totalLength, tiMem::totalLength, ttdssGetTargetParams(), dmMem_t::type, agsaMem_s::type, smMem_t::type, tiMem::type, tiLoLevelOption::usecsPerTick, dmMem_t::virtPtr, agsaMem_s::virtPtr, smMem_t::virtPtr, and tiMem::virtPtr.

Referenced by agtiapi_InitCardSW(), and agtiapi_ResetCard().

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

◆ tiCOMPortStart()

◆ tiCOMPortStop()

◆ tiCOMSetControllerConfig()

◆ tiCOMSetOperator()

osGLOBAL bit32 tiCOMSetOperator ( tiRoot_t tiRoot,
bit32  flag,
void *  cert 
)

Variable Documentation

◆ gSSC_Disable

bit32 gSSC_Disable = 0

Definition at line 96 of file tdport.c.

Referenced by tiCOMPortStart().

◆ sgpioResponseSet

bit32 volatile sgpioResponseSet = 0

Definition at line 97 of file tdport.c.

Referenced by ostiSgpioIoctlRsp(), and SendSgpioRequest().