FreeBSD kernel pms device code
|
Go to the source code of this file.
osGLOBAL bit32 smDeregisterDevice | ( | smRoot_t * | smRoot, |
agsaDevHandle_t * | agDevHandle, | ||
smDeviceHandle_t * | smDeviceHandle | ||
) |
Definition at line 85 of file smsat.c.
References agNULL, SM_DBG1, SM_DBG2, SM_RC_FAILURE, smRemoveFromSharedcontext(), and status.
Referenced by ossaDeregisterDeviceHandleCB().
osGLOBAL void smGetRequirements | ( | smRoot_t * | smRoot, |
smSwConfig_t * | swConfig, | ||
smMemoryRequirement_t * | memoryRequirement, | ||
bit32 * | usecsPerTick, | ||
bit32 * | maxNumLocks | ||
) |
Definition at line 51 of file sminit.c.
References agNULL, smMem_t::alignment, smMemoryRequirement_t::count, DEFAULT_KEY_BUFFER_SIZE, smSwConfig_t::maxActiveIOs, smSwConfig_t::numDevHandles, smMem_t::numElements, osti_strncmp, osti_strtoul, smMem_t::singleElementLength, SM_ASSERT, SM_CACHED_MEM, SM_DBG2, SM_DBG3, SM_DEVICE_MEM_INDEX, SM_IO_MEM_INDEX, SM_MAX_DEV, SM_MAX_IO, SM_MAX_LOCKS, sm_memset(), SM_RC_SUCCESS, SM_ROOT_MEM_INDEX, SM_USECS_PER_TICK, smMemoryRequirement_t::smMemory, tdsmGetTransportParam(), smMem_t::totalLength, and smMem_t::type.
Referenced by tdsaLoLevelGetResource(), and tiCOMInit().
osGLOBAL bit32 smIDStart | ( | smRoot_t * | smRoot, |
smIORequest_t * | smIORequest, | ||
smDeviceHandle_t * | smDeviceHandle | ||
) |
Definition at line 3143 of file smsat.c.
References agFALSE, agNULL, smIORequestBody_s::agSATARequestBody, agsaSATAInitiatorRequest_s::fis, agsaSATAHostFis_u::fisRegHostToDev, smDeviceData_s::id, smIORequestBody_s::id, smSatIOContext_s::pFis, smSatIOContext_s::pSatDevData, smSatIOContext_s::psmDeviceHandle, smIORequestBody_s::SATA, smIORequestBody_s::satIOContext, SM_DBG1, SM_DBG2, SM_DBG3, SM_RC_FAILURE, SM_RC_SUCCESS, smContext_t::smData, smIORequestBody_s::smDevHandle, smIOReInit(), smIORequestBody_s::smIORequest, smSatIOContext_s::smRequestBody, smsatIDSubStart(), smSatIOContext_s::smScsiXchg, status, smIORequestBody_s::transport, and smDeviceData_s::valid.
osGLOBAL bit32 smInitialize | ( | smRoot_t * | smRoot, |
agsaRoot_t * | agRoot, | ||
smMemoryRequirement_t * | memoryAllocated, | ||
smSwConfig_t * | swConfig, | ||
bit32 | usecsPerTick | ||
) |
< Initialize the TDM data part of the interrupt context
< initializes timers
< initializes devices
< initializes IOs
Definition at line 160 of file sminit.c.
References agNULL, smIntContext_s::agRoot, agTRUE, smMem_t::alignment, smMemoryRequirement_t::count, DEFAULT_KEY_BUFFER_SIZE, smIntContext_s::DeviceMem, smIntContext_s::FCA, gsmRoot, smIntContext_s::IOMem, smMem_t::numElements, smMem_t::osHandle, osti_strncmp, osti_strtoul, smMem_t::physAddrLower, smMem_t::physAddrUpper, smMem_t::reserved, smMem_t::singleElementLength, SM_ASSERT, SM_DBG1, SM_DBG2, SM_DBG3, SM_DEVICE_MEM_INDEX, SM_IO_MEM_INDEX, SM_MAX_DEV, sm_memset(), SM_RC_FAILURE, SM_RC_SUCCESS, SM_ROOT_MEM_INDEX, smRootOsData_s::smAllShared, smIntRoot_s::smAllShared, smContext_t::smData, smDeviceDataInit(), smInitTimers(), smIOInit(), smMemoryRequirement_t::smMemory, smRootOsData_s::smRoot, smIntContext_s::smRootOsData, tdsmGetTransportParam(), smMem_t::totalLength, smMem_t::type, smIntContext_s::usecsPerTick, and smMem_t::virtPtr.
Referenced by tiCOMPortInit().
osGLOBAL bit32 smIOAbort | ( | smRoot_t * | smRoot, |
smIORequest_t * | tasktag | ||
) |
Definition at line 113 of file smsat.c.
References smIORequestBody_s::agIORequest, agNULL, AGSA_RC_SUCCESS, agTRUE, smIORequestBody_s::InitiatorTMIO, smIORequestBody_s::IOType, agsaContext_s::osData, smIORequestBody_s::osMemHandle, saSATAAbort(), smIORequestBody_s::SATA, smSatIOContext_s::satIntIoContext, smSatInternalIo_s::satIntRequestBody, smIORequestBody_s::satIOContext, agsaContext_s::sdkData, SM_DBG1, SM_DBG2, SM_RC_FAILURE, SM_RC_SUCCESS, smIntRoot_s::smAllShared, smaSATAAbortCB(), smContext_t::smData, smIORequestBody_s::smDevHandle, smIOReInit(), smIORequestBody_s::smIOToBeAbortedRequest, smSatIOContext_s::smRequestBody, status, tdsmAllocMemory(), tdsmFreeMemory(), and smIORequestBody_s::transport.
osGLOBAL bit32 smIOAbortAll | ( | smRoot_t * | smRoot, |
smDeviceHandle_t * | smDeviceHandle | ||
) |
Definition at line 239 of file smsat.c.
References smDeviceData_s::agDevHandle, agFALSE, smIORequestBody_s::agIORequest, agNULL, AGSA_RC_SUCCESS, agTRUE, smDeviceData_s::id, smIORequestBody_s::InitiatorTMIO, smIORequestBody_s::IOType, smDeviceData_s::OSAbortAll, agsaContext_s::osData, smIORequestBody_s::osMemHandle, saSATAAbort(), smIORequestBody_s::SATA, smIORequestBody_s::satIOContext, agsaContext_s::sdkData, SM_DBG1, SM_DBG2, SM_RC_FAILURE, SM_RC_SUCCESS, smIntRoot_s::smAllShared, smaSATAAbortCB(), smContext_t::smData, smIORequestBody_s::smDevHandle, smIOReInit(), smSatIOContext_s::smRequestBody, status, tdsmAllocMemory(), tdsmFreeMemory(), tdsmRotateQnumber(), smIORequestBody_s::transport, and smDeviceData_s::valid.
osGLOBAL FORCEINLINE bit32 smIOStart | ( | smRoot_t * | smRoot, |
smIORequest_t * | smIORequest, | ||
smDeviceHandle_t * | smDeviceHandle, | ||
smScsiInitiatorRequest_t * | smSCSIRequest, | ||
bit32 | interruptContext | ||
) |
Definition at line 466 of file smsat.c.
References agFALSE, agNULL, smIORequestBody_s::agSATARequestBody, smSatIOContext_s::currentLBA, agsaSATAInitiatorRequest_s::fis, agsaSATAHostFis_u::fisRegHostToDev, smDeviceData_s::id, smIORequestBody_s::id, smSatIOContext_s::interruptContext, smSatIOContext_s::OrgTL, smSatIOContext_s::pFis, smSatIOContext_s::pSatDevData, smSatIOContext_s::pScsiCmnd, smSatIOContext_s::pSense, smSatIOContext_s::psmDeviceHandle, smSatIOContext_s::pSmSenseData, smIORequestBody_s::SATA, smSatIOContext_s::satIntIoContext, smIORequestBody_s::satIOContext, smSatIOContext_s::satOrgIOContext, smScsiInitiatorRequest::scsiCmnd, smSenseData_t::senseData, smSenseData_t::senseLen, smIORequestBody_s::sensePayload, SM_DBG1, SM_DBG2, SM_DBG3, SM_RC_FAILURE, smContext_t::smData, smIORequestBody_s::smDevHandle, smIOReInit(), smIORequestBody_s::smIORequest, smSatIOContext_s::smRequestBody, smsatIOStart(), smSatIOContext_s::smScsiXchg, smIORequestBody_s::smSenseData, status, smSatIOContext_s::superIOFlag, smIORequestBody_s::transport, and smDeviceData_s::valid.
Referenced by tiINIIOStart().
osGLOBAL bit32 smRegisterDevice | ( | smRoot_t * | smRoot, |
agsaDevHandle_t * | agDevHandle, | ||
smDeviceHandle_t * | smDeviceHandle, | ||
agsaDevHandle_t * | agExpDevHandle, | ||
bit32 | phyID, | ||
bit32 | DeviceType | ||
) |
Definition at line 46 of file smsat.c.
References agNULL, smDeviceData_s::satDeviceType, SM_DBG1, SM_DBG2, SM_RC_FAILURE, SM_RC_SUCCESS, and smAddToSharedcontext().
Referenced by ossaDeviceRegistrationCB().
osGLOBAL bit32 smSuperIOStart | ( | smRoot_t * | smRoot, |
smIORequest_t * | smIORequest, | ||
smDeviceHandle_t * | smDeviceHandle, | ||
smSuperScsiInitiatorRequest_t * | smSCSIRequest, | ||
bit32 | AddrHi, | ||
bit32 | AddrLo, | ||
bit32 | interruptContext | ||
) |
Definition at line 351 of file smsat.c.
References agFALSE, agNULL, smIORequestBody_s::agSATARequestBody, agTRUE, smSatIOContext_s::currentLBA, agsaSATAInitiatorRequest_s::fis, agsaSATAHostFis_u::fisRegHostToDev, smDeviceData_s::id, smIORequestBody_s::id, smSatIOContext_s::interruptContext, smSatIOContext_s::OrgTL, smSatIOContext_s::pFis, smSatIOContext_s::pSatDevData, smSatIOContext_s::pScsiCmnd, smSatIOContext_s::pSense, smSatIOContext_s::psmDeviceHandle, smSatIOContext_s::pSmSenseData, smDeviceData_s::sasAddressHi, smDeviceData_s::sasAddressLo, smIORequestBody_s::SATA, smSatIOContext_s::satIntIoContext, smIORequestBody_s::satIOContext, smSatIOContext_s::satOrgIOContext, smSuperScsiInitiatorRequest::scsiCmnd, smSenseData_t::senseData, smSenseData_t::senseLen, smIORequestBody_s::sensePayload, SM_DBG1, SM_DBG2, SM_DBG3, SM_RC_FAILURE, smContext_t::smData, smIORequestBody_s::smDevHandle, smIOReInit(), smIORequestBody_s::smIORequest, smSatIOContext_s::smRequestBody, smsatIOStart(), smSatIOContext_s::smScsiXchg, smIORequestBody_s::smSenseData, status, smSatIOContext_s::superIOFlag, smIORequestBody_s::transport, and smDeviceData_s::valid.
Referenced by tiINISuperIOStart().
osGLOBAL bit32 smTaskManagement | ( | smRoot_t * | smRoot, |
smDeviceHandle_t * | smDeviceHandle, | ||
bit32 | task, | ||
smLUN_t * | lun, | ||
smIORequest_t * | taskTag, | ||
smIORequest_t * | currentTaskTag | ||
) |
Definition at line 543 of file smsat.c.
References AG_LOGICAL_UNIT_RESET, smDeviceData_s::agDevHandle, smDeviceData_s::agDeviceResetContext, agFALSE, agNULL, AGSA_PHY_HARD_RESET, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, smDeviceData_s::directlyAttached, smDeviceData_s::id, lun, agsaContext_s::osData, smDeviceData_s::phyID, SA_DS_IN_RECOVERY, saLocalPhyControl(), saSetDeviceState(), SAT_DEV_STATE_IN_RECOVERY, smIORequestBody_s::SATA, smDeviceData_s::satAbortAfterReset, smDeviceData_s::satDriveState, smIORequestBody_s::satIOContext, SM_ABORT_TASK, SM_DBG1, SM_LOGICAL_UNIT_RESET, SM_RC_BUSY, SM_RC_FAILURE, SM_RC_SUCCESS, SM_TARGET_WARM_RESET, smIntRoot_s::smAllShared, smContext_t::smData, smIORequestBody_s::smDevHandle, smIOReInit(), smLocalPhyControlCB(), SMP_PHY_CONTROL_HARD_RESET, smPhyControlSend(), smSatIOContext_s::smRequestBody, smsatTaskManagement(), status, tdsmRotateQnumber(), and smIORequestBody_s::transport.