FreeBSD kernel pms device code
|
#include <sys/cdefs.h>
#include <dev/pms/config.h>
#include <dev/pms/freebsd/driver/common/osenv.h>
#include <dev/pms/freebsd/driver/common/ostypes.h>
#include <dev/pms/freebsd/driver/common/osdebug.h>
#include <dev/pms/RefTisa/sallsdk/api/sa.h>
#include <dev/pms/RefTisa/sallsdk/api/saapi.h>
#include <dev/pms/RefTisa/sallsdk/api/saosapi.h>
#include <dev/pms/RefTisa/tisa/api/titypes.h>
#include <dev/pms/RefTisa/tisa/api/ostiapi.h>
#include <dev/pms/RefTisa/tisa/api/tiapi.h>
#include <dev/pms/RefTisa/tisa/api/tiglobal.h>
#include <dev/pms/RefTisa/tisa/sassata/sas/common/tdtypes.h>
#include <dev/pms/freebsd/driver/common/osstring.h>
#include <dev/pms/RefTisa/tisa/sassata/common/tdutil.h>
#include <dev/pms/RefTisa/tisa/sassata/common/tdsatypes.h>
#include <dev/pms/RefTisa/tisa/sassata/common/tdproto.h>
Go to the source code of this file.
This file contains TB misc. functions
Definition in file tdmisc.c.
__FBSDID | ( | "$FreeBSD$" | ) |
osGLOBAL void ossaDisableInterrupts | ( | agsaRoot_t * | agRoot, |
bit32 | outboundChannelNum | ||
) |
ossaDisableInterrupts
Purpose: This routine is called to disable interrupt
agRoot | Pointer to chip/driver Instance. |
outboundChannelNum | Zero-base channel number |
Definition at line 1890 of file tdmisc.c.
References agsaContext_s::osData, ostiInterruptDisable(), and tdsaRootOsData_s::tiRoot.
Referenced by saDelayedInterruptHandler(), saFatalInterruptHandler(), saInitialize(), saInterruptHandler(), and siFatalInterruptHandler().
osGLOBAL void ossaReenableInterrupts | ( | agsaRoot_t * | agRoot, |
bit32 | outboundChannelNum | ||
) |
ossaReenableInterrupts
\biref tiINIReportErrorToEventLog
Purpose: This function is called to report errors that needs to be logged into event log.
tiRoot | Pointer to initiator specific root data structure for this instance of the driver. |
agEventData | Event data structure. |
Purpose: This routine is called to enable interrupt
agRoot | Pointer to chip/driver Instance. |
outboundChannelNum | Zero-base channel number |
Definition at line 628 of file tdmisc.c.
References agsaContext_s::osData, ostiInterruptEnable(), and tdsaRootOsData_s::tiRoot.
Referenced by saDelayedInterruptHandler(), saInitialize(), saSystemInterruptsActive(), and saSystemInterruptsEnable().
Definition at line 2807 of file tdmisc.c.
References tdList_s::blink, hdr, tdsaPortContext_s::id, NULL, TDLIST_OBJECT_BASE, and TI_DBG6.
Definition at line 2733 of file tdmisc.c.
References tdList_s::flink, hdr, tdsaDeviceData_s::id, tdsaPortContext_s::id, NULL, TDLIST_OBJECT_BASE, and TI_DBG6.
Referenced by ossaHwCB().
void tdhexdump | ( | const char * | ptitle, |
bit8 * | pbuf, | ||
int | len | ||
) |
hexidecimal dump
Definition at line 2836 of file tdmisc.c.
References TI_DBG1, and TI_DBG2.
Referenced by itdssIOSuccessHandler(), ossaEchoCB(), ossaGetDeviceInfoCB(), ossaGetNVMDResponseCB(), ossaHwCB(), ossaSGpioCB(), ossaSSPEvent(), tiINISMPStart(), and ttdsaReportGeneralRespSend().
osGLOBAL bit32 tdsaAbortAll | ( | tiRoot_t * | tiRoot, |
agsaRoot_t * | agRoot, | ||
tdsaDeviceData_t * | oneDeviceData | ||
) |
Definition at line 354 of file tdmisc.c.
References tdsaDeviceData_s::agDevHandle, agFALSE, tdIORequestBody_s::agIORequest, agNULL, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agTRUE, DEVICE_IS_SATA_DEVICE, DEVICE_IS_SMP_TARGET, DEVICE_IS_SSP_TARGET, DEVICE_IS_STP_TARGET, tdsaDeviceData_s::id, satDeviceData_t::IDDeviceValid, tdIORequestBody_s::InitiatorTMIO, tdIORequestBody_s::IOCompletionFunc, tdIORequestBody_s::IOType, agsaContext_s::osData, tdIORequestBody_s::osMemHandle, ostiAllocMemory(), ostiFreeMemory(), saSATAAbort(), saSMPAbort(), saSSPAbort(), tdsaDeviceData_s::satDevData, agsaContext_s::sdkData, status, tdsaDeviceData_s::target_ssp_stp_smp, tdsaRotateQnumber(), TI_DBG1, TI_DBG2, tdIORequestBody_s::tiDevHandle, tdsaDeviceData_s::tiDeviceHandle, tiError, and tiSuccess.
Referenced by ossaDeviceRegistrationCB(), and tiTGTIOAbortAll().
osGLOBAL void tdsaDeregisterDevicesInPort | ( | tiRoot_t * | tiRoot, |
tdsaPortContext_t * | onePortContext | ||
) |
Definition at line 2604 of file tdmisc.c.
References tdsaDeviceData_s::agDevHandle, agNULL, agTRUE, DEVICE_IS_SMP_TARGET, tdsaDeviceData_s::directlyAttached, tdList_s::flink, tdsaDeviceData_s::id, tdsaPortContext_s::id, tdsaDeviceData_s::registered, saDeregisterDeviceHandle(), tiRoot::tdData, TDLIST_OBJECT_BASE, tdsaDeviceData_s::tdPortContext, tdsaRoot_s::tdsaAllShared, tdsaRotateQnumber(), TI_DBG1, and TI_DBG3.
Referenced by ossaPortControlCB().
osGLOBAL void tdsaPhyControlFailureRespRcvd | ( | tiRoot_t * | tiRoot, |
agsaRoot_t * | agRoot, | ||
tdsaDeviceData_t * | oneDeviceData, | ||
tdssSMPFrameHeader_t * | frameHeader, | ||
agsaFrameHandle_t | frameHandle, | ||
tiIORequest_t * | CurrentTaskTag | ||
) |
Definition at line 2302 of file tdmisc.c.
References agFALSE, agNULL, agTRUE, NULL, ostiInitiatorEvent(), TDSASAddressID_s::sasAddressHi, tdsaDeviceData_s::SASAddressID, TDSASAddressID_s::sasAddressLo, tdsaDeviceData_s::satDevData, satDeviceData_t::satNCQMaxIO, satDeviceData_t::satPendingIO, satDeviceData_t::satPendingNCQIO, satDeviceData_t::satPendingNONNCQIO, tiIORequest::tdData, tdsaDeviceData_s::tdPortContext, TI_DBG1, TI_DBG2, TI_DBG3, tdsaDeviceData_s::tiDeviceHandle, tiIntrEventTypeTaskManagement, tiIntrEventTypeTransportRecovery, tdsaPortContext_s::tiPortalContext, tiRecFailed, tiTMFailed, and tdsaDeviceData_s::TRflag.
osGLOBAL void tdsaPhyControlRespRcvd | ( | tiRoot_t * | tiRoot, |
agsaRoot_t * | agRoot, | ||
agsaIORequest_t * | agIORequest, | ||
tdsaDeviceData_t * | oneDeviceData, | ||
tdssSMPFrameHeader_t * | frameHeader, | ||
agsaFrameHandle_t | frameHandle, | ||
tiIORequest_t * | CurrentTaskTag | ||
) |
Definition at line 2390 of file tdmisc.c.
References tdsaDeviceData_s::agDevHandle, agFALSE, agNULL, agTRUE, INITIATOR_DRIVER, NULL, ostiInitiatorEvent(), SA_DS_OPERATIONAL, TDSASAddressID_s::sasAddressHi, tdsaDeviceData_s::SASAddressID, TDSASAddressID_s::sasAddressLo, saSetDeviceState(), SAT_DEV_STATE_NORMAL, tdsaDeviceData_s::satDevData, satDeviceData_t::satDriveState, satDeviceData_t::satNCQMaxIO, satDeviceData_t::satPendingIO, satDeviceData_t::satPendingNCQIO, satDeviceData_t::satPendingNONNCQIO, SMP_FUNCTION_ACCEPTED, tdssSMPFrameHeader_s::smpFunctionResult, tiIORequest::tdData, tdsaDeviceData_s::tdPortContext, tdsaRotateQnumber(), TI_DBG1, TI_DBG2, TI_DBG3, tdsaDeviceData_s::tiDeviceHandle, tiIntrEventTypeTaskManagement, tiIntrEventTypeTransportRecovery, tdsaPortContext_s::tiPortalContext, tiRecFailed, tiRecOK, tiTMFailed, tiTMOK, and tdsaDeviceData_s::TRflag.
osGLOBAL void tdsaPrintHwConfig | ( | agsaHwConfig_t * | HwConfig | ) |
Definition at line 2672 of file tdmisc.c.
References agNULL, agsaHwConfig_s::phyCount, and TI_DBG6.
Referenced by tiCOMPortInit().
osGLOBAL void tdsaPrintSwConfig | ( | agsaSwConfig_t * | SwConfig | ) |
Definition at line 2652 of file tdmisc.c.
References agNULL, agsaSwConfig_s::maxActiveIOs, agsaSwConfig_s::smpReqTimeout, and TI_DBG6.
Referenced by tdsaLoLevelGetResource(), and tiCOMPortInit().
Definition at line 2862 of file tdmisc.c.
References agNULL, tdsaContext_s::MaxNumLLLocks, tdsaContext_s::MaxNumOSLocks, ostiSingleThreadedEnter(), TD_ASSERT, tiRoot::tdData, and tdsaRoot_s::tdsaAllShared.
Referenced by ossaDeregisterDeviceHandleCB(), ossaDeviceRegistrationCB(), ossaHwCB(), ostiGetGpioIOCTLRsp(), tdsaAddTimer(), tdsaKillTimer(), tdsaProcessTimers(), tdssAddSASToSharedcontext(), tiCOMGetPortInfo(), tiINIDiscoverTargets(), tiINIGetDeviceHandles(), tiINIGetDeviceHandlesForWinIOCTL(), tiINIGetExpander(), tiINIGetExpDeviceHandleBySasAddress(), ttdsaDumpallXchg(), ttdsaXchgFreeStruct(), ttdsaXchgGetStruct(), and ttdsaXchgLinkInit().
Definition at line 2875 of file tdmisc.c.
References agNULL, tdsaContext_s::MaxNumLLLocks, tdsaContext_s::MaxNumOSLocks, ostiSingleThreadedLeave(), TD_ASSERT, tiRoot::tdData, and tdsaRoot_s::tdsaAllShared.
Referenced by ossaDeregisterDeviceHandleCB(), ossaDeviceRegistrationCB(), ossaHwCB(), ostiGetGpioIOCTLRsp(), tdsaAddTimer(), tdsaKillTimer(), tdsaProcessTimers(), tdssAddSASToSharedcontext(), tiCOMGetPortInfo(), tiINIDiscoverTargets(), tiINIGetDeviceHandles(), tiINIGetDeviceHandlesForWinIOCTL(), tiINIGetExpander(), tiINIGetExpDeviceHandleBySasAddress(), ttdsaDumpallXchg(), ttdsaXchgFreeStruct(), ttdsaXchgGetStruct(), and ttdsaXchgLinkInit().
osGLOBAL void tdssPrintSASIdentify | ( | agsaSASIdentify_t * | id | ) |
Definition at line 2689 of file tdmisc.c.
References agNULL, agsaSASIdentify_s::phyIdentifier, SA_IDFRM_GET_DEVICETTYPE, SA_IDFRM_GET_SAS_ADDRESSHI, SA_IDFRM_GET_SAS_ADDRESSLO, SA_IDFRM_IS_SMP_INITIATOR, SA_IDFRM_IS_SMP_TARGET, SA_IDFRM_IS_SSP_INITIATOR, SA_IDFRM_IS_SSP_TARGET, SA_IDFRM_IS_STP_INITIATOR, SA_IDFRM_IS_STP_TARGET, TI_DBG1, and TI_DBG6.
Referenced by tiCOMPortStart().
osGLOBAL void tiCOMFrameReadBlock | ( | tiRoot_t * | tiRoot, |
void * | agFrame, | ||
bit32 | FrameOffset, | ||
void * | FrameBuffer, | ||
bit32 | FrameBufLen | ||
) |
Definition at line 1908 of file tdmisc.c.
References agNULL, saFrameReadBlock(), tiRoot::tdData, tdsaRoot_s::tdsaAllShared, and TI_DBG6.
Definition at line 503 of file tdmisc.c.
References agNULL, AGSA_CHIP_RESET, AGSA_SOFT_RESET, agTRUE, agsaForensicData_t::dataBuf, agsaForensicData_t::DataType, agsaForensicData_t::directData, agsaForensicData_t::directLen, agsaForensicData_t::directOffset, agsaFatalErrorInfo_s::errorInfo1, agsaControllerStatus_s::fatalErrorInfo, agsaForensicData_t::readLen, saGetControllerStatus(), saGetForensicData(), saHwReset(), status, tiRoot::tdData, tdsaRoot_s::tdsaAllShared, TI_DBG1, TI_DBG2, TI_DBG6, tiSoftReset, and TYPE_FATAL.
Referenced by agtiapi_ResetCard().
Definition at line 1789 of file tdmisc.c.
References agNULL, agsaForensicData_t::dataBuf, agsaForensicData_t::DataType, agsaForensicData_t::directData, agsaForensicData_t::directLen, agsaForensicData_t::directOffset, ostiPortEvent(), agsaForensicData_t::readLen, saGetForensicData(), saHwShutdown(), status, tiRoot::tdData, tdsaRoot_s::tdsaAllShared, tdsaFreeCardID(), tdsaResetComMemFlags(), TI_DBG1, tiPortShutdown, tiSuccess, and TYPE_NON_FATAL.
Referenced by agtiapi_ReleaseHBA().