FreeBSD kernel pms device code
|
The file implements the functions of IOCTL MPI Command/Response to/from SPC. More...
#include <sys/cdefs.h>
#include <dev/pms/config.h>
#include <dev/pms/RefTisa/sallsdk/spc/saglobal.h>
Go to the source code of this file.
Macros | |
#define | LEFT_BYTE_FAIL(x, v) do {if( (x) < (v) ) return AGSA_RC_FAILURE; } while(0); |
#define | _1M 0x100000 |
Functions | |
__FBSDID ("$FreeBSD$") | |
LOCAL bit32 | siGSMDump (agsaRoot_t *agRoot, bit32 gsmDumpOffset, bit32 length, void *directData) |
Dump GSM registers from the controller. More... | |
GLOBAL bit32 | saFwFlashUpdate (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaUpdateFwFlash_t *flashUpdateInfo) |
SPC FW Flash Update Command. More... | |
GLOBAL bit32 | saFlashExtExecute (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaFlashExtExecute_t *agFlashExtExe) |
GLOBAL bit32 | mpiFwFlashUpdateRsp (agsaRoot_t *agRoot, agsaFwFlashUpdateRsp_t *payload) |
SPC FW_FLASH_UPDATE Respond. More... | |
GLOBAL bit32 | mpiFwExtFlashUpdateRsp (agsaRoot_t *agRoot, agsaFwFlashOpExtRsp_t *payload) |
GLOBAL bit32 | saGetControllerInfo (agsaRoot_t *agRoot, agsaControllerInfo_t *controllerInfo) |
SPC Get Controller Information Command. More... | |
GLOBAL bit32 | saGetControllerStatus (agsaRoot_t *agRoot, agsaControllerStatus_t *controllerStatus) |
SPC Get Controller Status Command. More... | |
GLOBAL bit32 | saGetControllerEventLogInfo (agsaRoot_t *agRoot, agsaControllerEventLog_t *eventLogInfo) |
SPC Get Controller Event Log Information Command. More... | |
GLOBAL bit32 | saGpioEventSetup (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaGpioEventSetupInfo_t *gpioEventSetupInfo) |
SPC Set GPIO Event Setup Command. More... | |
GLOBAL bit32 | saGpioPinSetup (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaGpioPinSetupInfo_t *gpioPinSetupInfo) |
SPC Set GPIO Pin Setup Command. More... | |
GLOBAL bit32 | saGpioRead (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum) |
SPC GPIO Read Command. More... | |
GLOBAL bit32 | saGpioWrite (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, bit32 gpioWriteMask, bit32 gpioWriteValue) |
SPC GPIO Write Command. More... | |
GLOBAL bit32 | saSASDiagExecute (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaSASDiagExecute_t *diag) |
SPC SAS Diagnostic Execute Command. More... | |
GLOBAL bit32 | saSASDiagStartEnd (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, bit32 phyId, bit32 operation) |
SPC SAS Diagnostic Start/End Command. More... | |
GLOBAL bit32 | saGetTimeStamp (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum) |
Initiate a GET TIME STAMP command. More... | |
static void | saUpdateIOMap (agsaIOMap_t *pIOMap, bit32 HTag, agsaIORequestDesc_t *pRequest, agsaContext_t *agContext) |
Update IOMap Entry More... | |
agsaIORequestDesc_t * | saGetRequestFromFreePool (agsaRoot_t *agRoot, agsaContext_t *agContext) |
Get a request from free pool. More... | |
void | saReturnRequestToFreePool (agsaRoot_t *agRoot, agsaIORequestDesc_t *pRequest) |
Return request to free pool. More... | |
GLOBAL bit32 | saSgpio (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaSGpioReqResponse_t *pSGpioReq) |
Initiate a serial GPIO command. More... | |
LOCAL void | siSpcGetErrorContent (agsaRoot_t *agRoot) |
for spc card read Error Registers to memory if error occur More... | |
LOCAL void | siSpcvGetErrorContent (agsaRoot_t *agRoot) |
for spcv card read Error Registers to memory if error occur More... | |
LOCAL bit32 | siDumpInboundQueue (void *buffer, bit32 length, mpiICQueue_t *q) |
LOCAL bit32 | siDumpOutboundQueue (void *buffer, bit32 length, mpiOCQueue_t *q) |
LOCAL bit32 | siWaitForNonFatalTransfer (agsaRoot_t *agRoot, bit32 pcibar) |
LOCAL bit32 | siWaitForFatalTransfer (agsaRoot_t *agRoot, bit32 pcibar) |
LOCAL bit32 | siFatalErrorBuffer (agsaRoot_t *agRoot, agsaForensicData_t *forensicData) |
LOCAL bit32 | siNonFatalErrorBuffer (agsaRoot_t *agRoot, agsaForensicData_t *forensicData) |
LOCAL bit32 | siGetForensicData (agsaRoot_t *agRoot, agsaContext_t *agContext, agsaForensicData_t *forensicData) |
bit32 | saGetForensicData (agsaRoot_t *agRoot, agsaContext_t *agContext, agsaForensicData_t *forensicData) |
bit32 | saGetIOErrorStats (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 flag) |
bit32 | saGetIOEventStats (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 flag) |
bit32 | saGetRegisterDump (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaRegDumpInfo_t *regDumpInfo) |
Initiate a GET REGISTER DUMP command. More... | |
bit32 | siGetRegisterDumpGSM (agsaRoot_t *agRoot, void *destinationAddress, bit32 regDumpNum, bit32 regDumpOffset, bit32 len) |
Initiate a GET REGISTER DUMP from GSM command. More... | |
bit32 | saGetNVMDCommand (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaNVMDData_t *NVMDInfo) |
SPC Get NVMD Command. More... | |
bit32 | saSetNVMDCommand (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaNVMDData_t *NVMDInfo) |
SPC Set NVMD Command. More... | |
GLOBAL bit32 | saSendSMPIoctl (agsaRoot_t *agRoot, agsaDevHandle_t *agDevHandle, bit32 queueNum, agsaSMPFrame_t *pSMPFrame, ossaSMPCompletedCB_t agCB) |
bit32 | saReconfigSASParams (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaSASReconfig_t *agSASConfig) |
Reconfiguration of SAS Parameters Command. More... | |
bit32 | saPCIeDiagExecute (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaPCIeDiagExecute_t *diag) |
bit32 | saGetDFEData (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, bit32 interface, bit32 laneNumber, bit32 interations, agsaSgl_t *agSgl) |
Variables | |
bit32 | gFPGA_TEST |
bit32 | gWait_3 |
bit32 | gWait_2 |
The file implements the functions of IOCTL MPI Command/Response to/from SPC.
Definition in file saioctlcmd.c.
#define _1M 0x100000 |
#define LEFT_BYTE_FAIL | ( | x, | |
v | |||
) | do {if( (x) < (v) ) return AGSA_RC_FAILURE; } while(0); |
Definition at line 2335 of file saioctlcmd.c.
__FBSDID | ( | "$FreeBSD$" | ) |
GLOBAL bit32 mpiFwExtFlashUpdateRsp | ( | agsaRoot_t * | agRoot, |
agsaFwFlashOpExtRsp_t * | payload | ||
) |
Definition at line 641 of file saioctlcmd.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_RC_SUCCESS, agsaFlashExtResponse_s::epart_sect_size, agsaFlashExtResponse_s::epart_size, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, hpDBG_VERY_LOUD, agsaLLRoot_s::IOMap, agsaIOMap_s::IORequest, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, OSSA_OFFSET_OF, ossaFlashExtExecuteCB(), ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), SA_ASSERT, SA_DBG1, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, agsaContext_s::sdkData, smTraceFuncEnter, smTraceFuncExit, Status, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
Referenced by mpiParseOBIomb().
GLOBAL bit32 mpiFwFlashUpdateRsp | ( | agsaRoot_t * | agRoot, |
agsaFwFlashUpdateRsp_t * | payload | ||
) |
SPC FW_FLASH_UPDATE Respond.
This command sends FW Flash Update Status to TD layer.
agRoot | Handles for this instance of SAS/SATA LL |
payload | FW download response payload |
Definition at line 591 of file saioctlcmd.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_RC_SUCCESS, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, hpDBG_VERY_LOUD, agsaLLRoot_s::IOMap, agsaIOMap_s::IORequest, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, OSSA_OFFSET_OF, ossaFwFlashUpdateCB(), ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), SA_ASSERT, SA_DBG1, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, agsaContext_s::sdkData, smTraceFuncEnter, smTraceFuncExit, status, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
Referenced by mpiParseOBIomb().
GLOBAL bit32 saFlashExtExecute | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaFlashExtExecute_t * | agFlashExtExe | ||
) |
Definition at line 370 of file saioctlcmd.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_MAX_INBOUND_Q, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agsaFlashExtExecute_s::agSgl, agTRUE, agsaFlashExtExecute_s::command, agsaFlashExtExecute_s::dataLen, agsaSgl_s::extReserved, agsaLLRoot_s::freeIORequests, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::inboundQueue, agsaLLRoot_s::IOMap, IOMB_SIZE64, agsaIOMap_s::IORequest, agsaSgl_s::len, agsaIORequestDesc_s::linkNode, LL_IOREQ_IBQ0_LOCK, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, MPI_CATEGORY_SAS_SATA, MPI_IB_NUM_MASK, MPI_OB_NUM_MASK, MPI_OB_SHIFT, mpiMsgFreeGet(), mpiMsgProduce(), OPC_INB_FLASH_OP_EXT, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), agsaFlashExtExecute_s::partOffset, mpiICQueue_s::priority, SA_ASSERT, SA_DBG1, SA_DBG3, saLlistIOAdd, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, agsaSgl_s::sgLower, agsaSgl_s::sgUpper, si_memset(), smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
GLOBAL bit32 saFwFlashUpdate | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaUpdateFwFlash_t * | flashUpdateInfo | ||
) |
SPC FW Flash Update Command.
This command sends FW Flash Update Command to SPC.
agRoot | Handles for this instance of SAS/SATA LL |
agContext | Context of SPC FW Flash Update Command |
queueNum | Inbound/outbound queue number |
flashUpdateInfo | Pointer of flash update information |
Definition at line 223 of file saioctlcmd.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_MAX_INBOUND_Q, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agsaUpdateFwFlash_s::agSgl, agTRUE, agsaUpdateFwFlash_s::currentImageLen, agsaUpdateFwFlash_s::currentImageOffset, agsaSgl_s::extReserved, agsaFwFlashUpdate_s::extReserved, agsaLLRoot_s::freeIORequests, FWFLASH_IOMB_RESERVED_LEN, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::inboundQueue, agsaLLRoot_s::IOMap, IOMB_SIZE64, agsaIOMap_s::IORequest, agsaSgl_s::len, agsaFwFlashUpdate_s::Len, agsaIORequestDesc_s::linkNode, LL_IOREQ_IBQ0_LOCK, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, MPI_CATEGORY_SAS_SATA, MPI_IB_NUM_MASK, MPI_OB_NUM_MASK, MPI_OB_SHIFT, mpiMsgFreeGet(), mpiMsgProduce(), OPC_INB_FW_FLASH_UPDATE, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), mpiICQueue_s::priority, agsaFwFlashUpdate_s::reserved0, SA_ASSERT, SA_DBG1, saLlistIOAdd, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, agsaFwFlashUpdate_s::SGLAH, agsaFwFlashUpdate_s::SGLAL, agsaSgl_s::sgLower, agsaSgl_s::sgUpper, smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, agsaUpdateFwFlash_s::totalImageLen, and agsaIORequestDesc_s::valid.
Referenced by tdipFWControlIoctl().
GLOBAL bit32 saGetControllerEventLogInfo | ( | agsaRoot_t * | agRoot, |
agsaControllerEventLog_t * | eventLogInfo | ||
) |
SPC Get Controller Event Log Information Command.
This command sends Get Controller Event Log Information Command to SPC.
agRoot | Handles for this instance of SAS/SATA LL |
eventLogInfo | event log information |
Definition at line 1345 of file saioctlcmd.c.
References agsaMemoryRequirement_s::agMemory, agNULL, AGSA_RC_SUCCESS, agsaControllerEventLog_s::eventLog1, agsaControllerEventLog_s::eventLog1Option, agsaControllerEventLog_s::eventLog2, agsaControllerEventLog_s::eventLog2Option, mpiHostLLConfigDescriptor_s::eventLogOption, hpDBG_VERY_LOUD, mpiHostLLConfigDescriptor_s::IOPeventLogOption, agsaLLRoot_s::mainConfigTable, agsaLLRoot_s::memoryAllocated, MPI_EVENTLOG_INDEX, MPI_IOP_EVENTLOG_INDEX, MPI_MEM_INDEX, SA_ASSERT, agsaContext_s::sdkData, smTraceFuncEnter, and smTraceFuncExit.
Referenced by tiCOMMgntIOCTL().
GLOBAL bit32 saGetControllerInfo | ( | agsaRoot_t * | agRoot, |
agsaControllerInfo_t * | controllerInfo | ||
) |
SPC Get Controller Information Command.
This command sends Get Controller Information Command to SPC.
agRoot | Handles for this instance of SAS/SATA LL |
controllerInfo | Controller Information |
Definition at line 714 of file saioctlcmd.c.
References agNULL, AGSA_RC_FAILURE, AGSA_RC_FW_NOT_IN_READY_STATE, AGSA_RC_HDA_NO_FW_RUNNING, AGSA_RC_SUCCESS, BOOTTLOADERHDA_IDLE, agsaControllerInfo_s::controllerSetting, agsaControllerInfo_s::fwInterfaceRev, agsaControllerInfo_s::fwRevision, GEN_MSGU_SCRATCH_PAD_0, GEN_MSGU_SCRATCH_PAD_1, GEN_MSGU_SCRATCH_PAD_2, GEN_MSGU_SCRATCH_PAD_3, gWait_2, HDA_CMD_CODE_OFFSET, HDA_RSP_OFFSET1MB, HDA_STATUS_BITS, hpDBG_VERY_LOUD, agsaControllerInfo_s::hwRevision, agsaControllerInfo_s::ilaRevision, MAIN_CNTRL_CAP_OFFSET, MAIN_FW_REVISION, MAIN_HDA_FLAG_BITS, MAIN_HDA_FLAGS_OFFSET, MAIN_ILAT_ILAV_ILASMRN_ILAMRN_ILAMJN, MAIN_INTERFACE_REVISION, MAIN_MAX_DEV_BITS, MAIN_MAX_OUTSTANDING_IO_OFFSET, MAIN_MAX_SGL_BITS, MAIN_MAX_SGL_OFFSET, MAIN_PHY_COUNT_MASK, MAIN_QSUPPORT_BITS, MAIN_SAS_SUPPORT_BITS, MAKE_MODULO, MATCHING_SPC_FW_VERSION, agsaControllerInfo_s::maxDevices, agsaControllerInfo_s::maxPendingIO, agsaControllerInfo_s::maxSgElements, mpiGetPCIBarIndex(), MSGU_SCRATCH_PAD_0, MSGU_SCRATCH_PAD_1, MSGU_SCRATCH_PAD_2, MSGU_SCRATCH_PAD_3, ossaHwRegReadConfig32(), ossaHwRegReadExt(), ossaStallThread(), PCIBAR3, agsaControllerInfo_s::PCILinkRate, agsaControllerInfo_s::PCIWidth, agsaControllerInfo_s::phyCount, agsaControllerInfo_s::queueSupport, SA_DBG1, SA_DBG2, agsaControllerInfo_s::sasSpecsSupport, SCRATCH_PAD0_BAR_MASK, SCRATCH_PAD0_OFFSET_MASK, SCRATCH_PAD1_RDY, SCRATCH_PAD1_RESERVED, SCRATCH_PAD1_V_BOOTSTATE_MASK, SCRATCH_PAD1_V_ERROR_STATE, SCRATCH_PAD1_V_ILA_ERROR_STATE, SCRATCH_PAD1_V_IOP0_ERROR_STATE, SCRATCH_PAD1_V_IOP1_ERROR_STATE, SCRATCH_PAD1_V_RAAE_ERROR_STATE, SCRATCH_PAD1_V_READY, SCRATCH_PAD1_V_RESERVED, SCRATCH_PAD2_RDY, SCRATCH_PAD2_RESERVED, SCRATCH_PAD_STATE_MASK, agsaContext_s::sdkData, agsaControllerInfo_s::sdkInterfaceRev, agsaControllerInfo_s::sdkRevision, SHIFT16, SHIFT19, SHIFT25, SHIFT26, SHIFT4, si_check_V_HDA(), si_memset(), agsaControllerInfo_s::signature, siHalRegReadExt(), smIS_SPC(), smIS_SPC12V(), smIS_SPC6V(), smIS_SPCV(), smTraceFuncEnter, smTraceFuncExit, SPC_READ_DEV_REV, STSDK_LL_12G_INTERFACE_VERSION, STSDK_LL_12G_VERSION, STSDK_LL_INTERFACE_VERSION, STSDK_LL_SPC_VERSION, STSDK_LL_VERSION, WAIT_INCREMENT, and WAIT_SECONDS.
Referenced by tdsaGetPhyGeneralStatusIoctl(), tiCOMMgntIOCTL(), and tiCOMPortInit().
GLOBAL bit32 saGetControllerStatus | ( | agsaRoot_t * | agRoot, |
agsaControllerStatus_t * | controllerStatus | ||
) |
SPC Get Controller Status Command.
This command sends Get Controller Status Command to SPC.
agRoot | Handles for this instance of SAS/SATA LL |
controllerStatus | controller status |
Definition at line 974 of file saioctlcmd.c.
References agNULL, AGSA_RC_FAILURE, AGSA_RC_FW_NOT_IN_READY_STATE, AGSA_RC_HDA_NO_FW_RUNNING, AGSA_RC_SUCCESS, agsaControllerStatus_s::bootComponentState, agsaControllerStatus_s::bootStatus, BOOTTLOADERHDA_IDLE, agsaFatalErrorInfo_s::errorInfo0, agsaFatalErrorInfo_s::errorInfo1, agsaFatalErrorInfo_s::errorInfo2, agsaFatalErrorInfo_s::errorInfo3, mpiHostLLConfigDescriptor_s::FatalErrorDumpLength0, mpiHostLLConfigDescriptor_s::FatalErrorDumpLength1, mpiHostLLConfigDescriptor_s::FatalErrorDumpOffset0, mpiHostLLConfigDescriptor_s::FatalErrorDumpOffset1, agsaControllerStatus_s::fatalErrorInfo, GEN_MSGU_SCRATCH_PAD_0, GEN_MSGU_SCRATCH_PAD_1, GEN_MSGU_SCRATCH_PAD_3, GST_INF_STATE_BITS, spc_GSTableDescriptor_s::GSTLenMPIS, HDA_CMD_CODE_OFFSET, HDA_RSP_OFFSET1MB, HDA_STATUS_BITS, hpDBG_VERY_LOUD, agsaControllerStatus_s::interfaceState, spc_GSTableDescriptor_s::Iop1Tcnt, spc_GSTableDescriptor_s::IopTcnt, agsaControllerStatus_s::iqFreezeState0, spc_GSTableDescriptor_s::IQFreezeState0, agsaControllerStatus_s::iqFreezeState1, spc_GSTableDescriptor_s::IQFreezeState1, IS_SDKDATA, agsaPhy_s::linkstatus, MAIN_FATAL_ERROR_RDUMP0_LENGTH, MAIN_FATAL_ERROR_RDUMP0_OFFSET, MAIN_FATAL_ERROR_RDUMP1_LENGTH, MAIN_FATAL_ERROR_RDUMP1_OFFSET, agsaLLRoot_s::mainConfigTable, MAKE_MODULO, mpiGetPCIBarIndex(), mpiReadGSTable(), MSGU_SCRATCH_PAD_0, MSGU_SCRATCH_PAD_1, MSGU_SCRATCH_PAD_2, MSGU_SCRATCH_PAD_3, spc_GSTableDescriptor_s::MsguTcnt, OSSA_DIF_ENGINE_FAILURE_MASK, OSSA_ENCRYPT_ENGINE_FAILURE_MASK, ossaHwRegRead(), ossaHwRegReadExt(), ossaStallThread(), PCIBAR3, agsaLLRoot_s::phys, spc_GSTableDescriptor_s::PhyState, agsaControllerStatus_s::phyStatus, agsaControllerStatus_s::recoverableErrorInfo, spc_GSTableDescriptor_s::recoverErrInfo, agsaFatalErrorInfo_s::regDumpBusBaseNum0, agsaFatalErrorInfo_s::regDumpBusBaseNum1, agsaFatalErrorInfo_s::regDumpLen0, agsaFatalErrorInfo_s::regDumpLen1, agsaFatalErrorInfo_s::regDumpOffset0, agsaFatalErrorInfo_s::regDumpOffset1, mpiHostLLConfigDescriptor_s::regDumpPCIBAR, SA_DBG1, SA_DBG2, SCRATCH_PAD0_BAR_MASK, SCRATCH_PAD0_OFFSET_MASK, SCRATCH_PAD1_ERR, SCRATCH_PAD1_RDY, SCRATCH_PAD1_RESERVED, SCRATCH_PAD1_V_RESERVED, SCRATCH_PAD2_ERR, SCRATCH_PAD2_RDY, SCRATCH_PAD2_RESERVED, SCRATCH_PAD_STATE_MASK, agsaContext_s::sdkData, SHIFT10, SHIFT12, SHIFT14, SHIFT16, SHIFT18, SHIFT2, SHIFT23, SHIFT24, SHIFT26, SHIFT4, SHIFT8, SHIFT9, si_check_V_HDA(), si_check_V_Ready(), si_memset(), siHalRegReadExt(), smIS_SPC(), smTraceFuncEnter, smTraceFuncExit, agsaControllerStatus_s::tickCount0, agsaControllerStatus_s::tickCount1, agsaControllerStatus_s::tickCount2, V_Scratchpad_0_Register, V_Scratchpad_1_Register, V_Scratchpad_2_Register, V_Scratchpad_3_Register, WAIT_INCREMENT, and WAIT_SECONDS.
Referenced by saHwReset(), tiCOMPortInit(), tiCOMPortStop(), and tiCOMReset().
bit32 saGetDFEData | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | interface, | ||
bit32 | laneNumber, | ||
bit32 | interations, | ||
agsaSgl_t * | agSgl | ||
) |
Definition at line 3923 of file saioctlcmd.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agTRUE, agsaSgl_s::extReserved, agsaLLRoot_s::freeIORequests, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::IOMap, IOMB_SIZE128, agsaIOMap_s::IORequest, agsaSgl_s::len, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, MPI_CATEGORY_SAS_SATA, mpiBuildCmd(), OPC_INB_GET_DFE_DATA, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), SA_ASSERT, SA_DBG1, saLlistIOAdd, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, agsaSgl_s::sgLower, agsaSgl_s::sgUpper, SHIFT7, si_memset(), smIS_SPCV(), smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
bit32 saGetForensicData | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
agsaForensicData_t * | forensicData | ||
) |
Definition at line 3004 of file saioctlcmd.c.
References ossaGetForensicDataCB(), siGetForensicData(), and status.
Referenced by tdsaForensicDataGetIoctl(), tiCOMReset(), and tiCOMShutDown().
bit32 saGetIOErrorStats | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | flag | ||
) |
Definition at line 3016 of file saioctlcmd.c.
References AGSA_RC_SUCCESS, agsaLLRoot_s::IoErrorCount, ossaGetIOErrorStatsCB(), agsaContext_s::sdkData, si_memset(), and status.
Referenced by tdsaIoErrorStatisticGetIoctl().
bit32 saGetIOEventStats | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | flag | ||
) |
Definition at line 3036 of file saioctlcmd.c.
References AGSA_RC_SUCCESS, agsaLLRoot_s::IoEventCount, ossaGetIOEventStatsCB(), agsaContext_s::sdkData, si_memset(), and status.
Referenced by tdsaIoEventStatisticGetIoctl().
bit32 saGetNVMDCommand | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaNVMDData_t * | NVMDInfo | ||
) |
SPC Get NVMD Command.
This command sends GET_NVMD_DATA Command to SPC.
agRoot | Handles for this instance of SAS/SATA LL |
agContext | Context of SPC FW Flash Update Command |
queueNum | Inbound/outbound queue number |
NVMDInfo | Pointer of NVM Device information |
Definition at line 3292 of file saioctlcmd.c.
References agNULL, AGSA_RC_SUCCESS, mpiGetNVMDCmd(), and SA_ASSERT.
Referenced by tdsaNVMDGetIoctl().
bit32 saGetRegisterDump | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaRegDumpInfo_t * | regDumpInfo | ||
) |
Initiate a GET REGISTER DUMP command.
This function is called to Get Register Dump from the SPC.
agRoot | handles for this instance of SAS/SATA hardware |
agContext | the context of this API |
queueNum | queue number |
regDumpInfo | register dump information |
Definition at line 3071 of file saioctlcmd.c.
References agNULL, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agsaRegDumpInfo_s::directData, agsaRegDumpInfo_s::directLen, GET_GSM_SM_INFO, GET_IOST_RB_INFO, hpDBG_VERY_LOUD, agsaRegDumpInfo_s::indirectAddrLower32, agsaRegDumpInfo_s::indirectAddrUpper32, agsaRegDumpInfo_s::indirectLen, mpiNVMReadRegDumpCmd(), OSSA_FAILURE, OSSA_SUCCESS, ossaGetRegisterDumpCB(), REG_DUMP_FLASH, REG_DUMP_NONFLASH, agsaRegDumpInfo_s::regDumpNum, agsaRegDumpInfo_s::regDumpOffset, agsaRegDumpInfo_s::regDumpSrc, REGISTER_DUMP_BUFF_SIZE, agsaLLRoot_s::registerDump0, agsaLLRoot_s::registerDump1, SA_ASSERT, SA_DBG1, SA_DBG3, agsaContext_s::sdkData, si_memcpy(), siGSMDump(), siSpcGetErrorContent(), siSpcvGetErrorContent(), smIS_SPC(), smIS_SPCV(), smTraceFuncEnter, smTraceFuncExit, SPC_GSM_SM_OFFSET, and SPCV_GSM_SM_OFFSET.
Referenced by tdsaRegDumpGetIoctl().
agsaIORequestDesc_t * saGetRequestFromFreePool | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext | ||
) |
Get a request from free pool.
This function gets a request from free pool
agRoot | Handles for this instance of SAS/SATA LL |
agsaContext | Context of this command |
Definition at line 2112 of file saioctlcmd.c.
References agNULL, agTRUE, agsaLLRoot_s::freeIORequests, agsaIORequestDesc_s::HTag, agsaLLRoot_s::IOMap, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), saLlistIOGetHead, saLlistIORemove, saUpdateIOMap(), agsaContext_s::sdkData, and agsaIORequestDesc_s::valid.
Referenced by saSgpio().
GLOBAL bit32 saGetTimeStamp | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum | ||
) |
Initiate a GET TIME STAMP command.
This function is called to initiate a Get Time Stamp command to the SPC. The completion of this function is reported in ossaGetTimeStampCB().
agRoot | handles for this instance of SAS/SATA hardware |
agContext | the context of this API |
queueNum | queue number |
Definition at line 1982 of file saioctlcmd.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agTRUE, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::IOMap, IOMB_SIZE64, agsaIOMap_s::IORequest, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, MPI_CATEGORY_SAS_SATA, mpiBuildCmd(), OPC_INB_GET_TIME_STAMP, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), SA_ASSERT, SA_DBG1, SA_DBG3, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, si_memset(), smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
GLOBAL bit32 saGpioEventSetup | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaGpioEventSetupInfo_t * | gpioEventSetupInfo | ||
) |
SPC Set GPIO Event Setup Command.
This command sends GPIO Event Setup Command to SPC.
agRoot | Handles for this instance of SAS/SATA LL |
agsaContext | Context of this command |
queueNum | Queue number of inbound/outbound queue |
gpioEventSetupInfo | Pointer of Event Setup Information structure |
Definition at line 1384 of file saioctlcmd.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_RC_BUSY, AGSA_RC_SUCCESS, agTRUE, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, GPIO_GE_BIT, agsaGpioEventSetupInfo_s::gpioEventFallingEdge, agsaGpioEventSetupInfo_s::gpioEventLevel, agsaGpioEventSetupInfo_s::gpioEventRisingEdge, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::IOMap, IOMB_SIZE64, agsaIOMap_s::IORequest, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, MPI_CATEGORY_SAS_SATA, mpiBuildCmd(), OPC_INB_GPIO, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), SA_ASSERT, SA_DBG1, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, si_memset(), smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
GLOBAL bit32 saGpioPinSetup | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaGpioPinSetupInfo_t * | gpioPinSetupInfo | ||
) |
SPC Set GPIO Pin Setup Command.
This command sends GPIO Pin Setup Command to SPC.
agRoot | Handles for this instance of SAS/SATA LL |
agsaContext | Context of this command |
queueNum | Queue number of inbound/outbound queue |
gpioPinSetupInfo | Pointer of Event Setup Information structure |
Definition at line 1477 of file saioctlcmd.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_RC_BUSY, AGSA_RC_SUCCESS, agTRUE, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, GPIO_GS_BIT, agsaGpioPinSetupInfo_t::gpioInputEnabled, agsaGpioPinSetupInfo_t::gpioTypePart1, agsaGpioPinSetupInfo_t::gpioTypePart2, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::IOMap, IOMB_SIZE64, agsaIOMap_s::IORequest, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, MPI_CATEGORY_SAS_SATA, mpiBuildCmd(), OPC_INB_GPIO, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), SA_ASSERT, SA_DBG1, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, si_memset(), smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
GLOBAL bit32 saGpioRead | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum | ||
) |
SPC GPIO Read Command.
This command sends GPIO Read Command to SPC.
agRoot | Handles for this instance of SAS/SATA LL |
agsaContext | Context of this command |
queueNum | Queue number of inbound/outbound queue |
Definition at line 1567 of file saioctlcmd.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_RC_BUSY, AGSA_RC_SUCCESS, agTRUE, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, GPIO_GR_BIT, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::IOMap, IOMB_SIZE64, agsaIOMap_s::IORequest, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, MPI_CATEGORY_SAS_SATA, mpiBuildCmd(), OPC_INB_GPIO, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), SA_ASSERT, SA_DBG1, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, si_memset(), smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
GLOBAL bit32 saGpioWrite | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | gpioWriteMask, | ||
bit32 | gpioWriteValue | ||
) |
SPC GPIO Write Command.
This command sends GPIO Write Command to SPC.
agRoot | Handles for this instance of SAS/SATA LL |
agsaContext | Context of this command |
queueNum | Queue number of inbound/outbound queue |
gpioWriteMask | GPIO Write Mask |
gpioWriteValue | GPIO Write Value |
Definition at line 1657 of file saioctlcmd.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_RC_BUSY, AGSA_RC_SUCCESS, agTRUE, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, GPIO_GW_BIT, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::IOMap, IOMB_SIZE64, agsaIOMap_s::IORequest, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, MPI_CATEGORY_SAS_SATA, mpiBuildCmd(), OPC_INB_GPIO, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), SA_ASSERT, SA_DBG1, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, si_memset(), smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
bit32 saPCIeDiagExecute | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaPCIeDiagExecute_t * | diag | ||
) |
Definition at line 3783 of file saioctlcmd.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_RC_BUSY, AGSA_RC_SUCCESS, agTRUE, agsaPCIeDiagExecute_s::command, agsaPCIeDiagExecute_s::flags, agsaLLRoot_s::freeIORequests, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaPCIeDiagExecute_s::initialIOSeed, agsaLLRoot_s::IOMap, IOMB_SIZE128, IOMB_SIZE64, agsaIOMap_s::IORequest, agsaPCIeDiagExecute_s::len, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, MPI_CATEGORY_SAS_SATA, mpiBuildCmd(), OPC_INB_PCIE_DIAG_EXECUTE, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), agsaPCIeDiagExecute_s::pattern, agsaPCIeDiagExecute_s::rdAddrLower, agsaPCIeDiagExecute_s::rdAddrUpper, agsaPCIeDiagExecute_s::reserved, SA_ASSERT, SA_DBG1, saLlistIOAdd, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, SHIFT16, SHIFT24, SHIFT8, si_memset(), smIS_SPCV(), smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, agsaPCIeDiagExecute_s::udrtArray, agsaPCIeDiagExecute_s::udtArray, agsaIORequestDesc_s::valid, agsaPCIeDiagExecute_s::wrAddrLower, and agsaPCIeDiagExecute_s::wrAddrUpper.
bit32 saReconfigSASParams | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaSASReconfig_t * | agSASConfig | ||
) |
Reconfiguration of SAS Parameters Command.
This command Reconfigure the SAS parameters to SPC.
agRoot | Handles for this instance of SAS/SATA LL |
agContext | Context of SPC FW Flash Update Command |
queueNum | Inbound/outbound queue number |
agSASConfig | Pointer of SAS Configuration Parameters |
Definition at line 3654 of file saioctlcmd.c.
References agNULL, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, mpiSasReinitializeCmd(), SA_ASSERT, SA_DBG1, and smIS_SPCV().
void saReturnRequestToFreePool | ( | agsaRoot_t * | agRoot, |
agsaIORequestDesc_t * | pRequest | ||
) |
Return request to free pool.
This function returns the request to free pool
agRoot | Handles for this instance of SAS/SATA LL |
pRequest | Request to be returned |
Definition at line 2158 of file saioctlcmd.c.
References agFALSE, agNULL, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, agsaIORequestDesc_s::HTag, agsaLLRoot_s::IOMap, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), SA_ASSERT, SA_DBG1, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saUpdateIOMap(), agsaContext_s::sdkData, and agsaIORequestDesc_s::valid.
Referenced by mpiSGpioRsp(), and saSgpio().
GLOBAL bit32 saSASDiagExecute | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaSASDiagExecute_t * | diag | ||
) |
SPC SAS Diagnostic Execute Command.
This command sends SAS Diagnostic Execute Command to SPC.
agRoot | Handles for this instance of SAS/SATA LL |
agsaContext | Context of this command |
queueNum | Queue number of inbound/outbound queue |
diag | Pointer of SAS Diag Execute Structure |
Definition at line 1751 of file saioctlcmd.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_RC_BUSY, AGSA_RC_SUCCESS, agTRUE, agsaSASDiagExecute_s::command, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::IOMap, IOMB_SIZE128, IOMB_SIZE64, agsaIOMap_s::IORequest, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, MPI_CATEGORY_SAS_SATA, mpiBuildCmd(), OPC_INB_SAS_DIAG_EXECUTE, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), agsaSASDiagExecute_s::param0, agsaSASDiagExecute_s::param1, agsaSASDiagExecute_s::param2, agsaSASDiagExecute_s::param3, agsaSASDiagExecute_s::param4, agsaSASDiagExecute_s::param5, SA_ASSERT, SA_DBG1, SA_DBG2, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, si_memset(), smIS_SPC(), smIS_SPCV(), smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
GLOBAL bit32 saSASDiagStartEnd | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | phyId, | ||
bit32 | operation | ||
) |
SPC SAS Diagnostic Start/End Command.
This command sends SAS Diagnostic Start/End Command to SPC.
agRoot | Handles for this instance of SAS/SATA LL |
agsaContext | Context of this command |
queueNum | Queue number of inbound/outbound queue |
phyId | Phy ID |
operation | Operation of SAS Diagnostic |
Definition at line 1880 of file saioctlcmd.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agTRUE, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::IOMap, IOMB_SIZE64, agsaIOMap_s::IORequest, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, MPI_CATEGORY_SAS_SATA, mpiBuildCmd(), OPC_INB_SAS_DIAG_MODE_START_END, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), SA_ASSERT, SA_DBG1, SA_DBG3, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, SHIFT8, si_memset(), SM_PHYID_MASK, smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
GLOBAL bit32 saSendSMPIoctl | ( | agsaRoot_t * | agRoot, |
agsaDevHandle_t * | agDevHandle, | ||
bit32 | queueNum, | ||
agsaSMPFrame_t * | pSMPFrame, | ||
ossaSMPCompletedCB_t | agCB | ||
) |
Definition at line 3346 of file saioctlcmd.c.
References agFALSE, agNULL, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, AGSA_SMP_IOCTL_REQUEST, agTRUE, agsaIORequestDesc_s::completionCB, agsaDeviceDesc_s::DeviceMapIndex, agsaSMPFrame_s::flag, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::inboundQueue, INDIRECT_MODE, agsaSMPFrame_s::inFrameAddrLower32, agsaSMPFrame_s::inFrameAddrUpper32, agsaSMPFrame_s::inFrameLen, agsaLLRoot_s::IOMap, IOMB_SIZE64, agsaIOMap_s::IORequest, agsaIORequestDesc_s::IRmode, agsaIORequestDesc_s::linkNode, LL_IOREQ_IBQ0_LOCK, LL_IOREQ_LOCKEQ_LOCK, MPI_IB_NUM_MASK, MPI_OB_NUM_MASK, MPI_OB_SHIFT, mpiMsgFreeGet(), mpiSMPCmd(), OPC_INB_SMP_REQUEST, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), agsaSMPFrame_s::outFrameAddrLower32, agsaSMPFrame_s::outFrameAddrUpper32, agsaSMPFrame_s::outFrameBuf, agsaSMPFrame_s::outFrameLen, agsaIORequestDesc_s::pDevice, agsaDeviceDesc_s::pendingIORequests, agsaIORequestDesc_s::pIORequestContext, agsaDeviceDesc_s::pPort, agsaIORequestDesc_s::pPort, agsaIORequestDesc_s::requestType, SA_ASSERT, SA_DBG1, SA_DBG2, saLlistIOAdd, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, SHIFT16, si_memset(), smIS_SPC(), smpFrameFlagIndirectPayload, smpFrameFlagIndirectResponse, smTraceFuncExit, agsaIORequestDesc_s::startTick, agsaIOMap_s::Tag, agsaLLRoot_s::timeTick, and agsaIORequestDesc_s::valid.
Referenced by tdsaSendSMPIoctl().
bit32 saSetNVMDCommand | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaNVMDData_t * | NVMDInfo | ||
) |
SPC Set NVMD Command.
This command sends SET_NVMD_DATA Command to SPC.
agRoot | Handles for this instance of SAS/SATA LL |
agContext | Context of SPC FW Flash Update Command |
queueNum | Inbound/outbound queue number |
NVMDInfo | Pointer of NVM Device information |
Definition at line 3327 of file saioctlcmd.c.
References agNULL, AGSA_RC_SUCCESS, mpiSetNVMDCmd(), and SA_ASSERT.
Referenced by tdsaNVMDSetIoctl().
GLOBAL bit32 saSgpio | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaSGpioReqResponse_t * | pSGpioReq | ||
) |
Initiate a serial GPIO command.
This function is called to initiate a serial GPIO command to the SPC. The completion of this function is reported in ossaSgpioCB().
agRoot | handles for this instance of SAS/SATA hardware |
agContext | the context of this API |
queueNum | queue number |
pSGpioReq | Pointer to the serial GPIO fields |
Definition at line 2203 of file saioctlcmd.c.
References agNULL, AGSA_RC_BUSY, AGSA_RC_SUCCESS, agsaSGpioReqResponse_s::function, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, IOMB_SIZE64, MPI_CATEGORY_SAS_SATA, mpiBuildCmd(), OPC_INB_SGPIO, OSSA_OFFSET_OF, agsaSGpioReqResponse_s::readWriteData, agsaSGpioReqResponse_s::registerCount, agsaSGpioReqResponse_s::registerIndex, agsaSGpioReqResponse_s::registerType, SA_ASSERT, SA_DBG1, SA_DBG3, SA_SAS_SMP_WRITE_GPIO_REGISTER, saGetRequestFromFreePool(), saReturnRequestToFreePool(), si_memset(), agsaSGpioReqResponse_s::smpFrameType, smTraceFuncEnter, and smTraceFuncExit.
Referenced by tdsaSGpioIoctlSetup().
|
static |
Update IOMap Entry
This function is called to update certain fields of IOMap Entry
pIOMap | IOMap Entry |
HTag | Host Tag |
pRequest | Request \parma agContext Context of this API |
Definition at line 2086 of file saioctlcmd.c.
References agsaIOMap_s::agContext, agsaIOMap_s::IORequest, and agsaIOMap_s::Tag.
Referenced by saGetRequestFromFreePool(), and saReturnRequestToFreePool().
LOCAL bit32 siDumpInboundQueue | ( | void * | buffer, |
bit32 | length, | ||
mpiICQueue_t * | q | ||
) |
Definition at line 2338 of file saioctlcmd.c.
References AGSA_RC_SUCCESS, mpiICQueue_s::memoryRegion, si_memcpy(), and mpiMem_s::virtPtr.
Referenced by siGetForensicData().
LOCAL bit32 siDumpOutboundQueue | ( | void * | buffer, |
bit32 | length, | ||
mpiOCQueue_t * | q | ||
) |
Definition at line 2349 of file saioctlcmd.c.
References AGSA_RC_SUCCESS, mpiOCQueue_s::memoryRegion, si_memcpy(), and mpiMem_s::virtPtr.
Referenced by siGetForensicData().
LOCAL bit32 siFatalErrorBuffer | ( | agsaRoot_t * | agRoot, |
agsaForensicData_t * | forensicData | ||
) |
Definition at line 2442 of file saioctlcmd.c.
References agNULL, AGSA_RC_COMPLETE, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agsaForensicData_t::BufferType, agsaForensicData_t::dataBuf, agsaForensicData_t::directData, agsaForensicData_t::directLen, agsaForensicData_t::directOffset, agsaLLRoot_s::FatalBarLoc, agsaLLRoot_s::FatalForensicShiftOffset, agsaLLRoot_s::FatalForensicStep, agsaLLRoot_s::ForensicLastOffset, GEN_MSGU_SCRATCH_PAD_0, GEN_MSGU_SCRATCH_PAD_1, GEN_MSGU_SCRATCH_PAD_2, GEN_MSGU_SCRATCH_PAD_3, hpDBG_VERY_LOUD, IOCTL_ERROR_NO_FATAL_ERROR, MAIN_MERRDCTO_MERRDCES, MPI_FATAL_EDUMP_TABLE_ACCUM_LEN, MPI_FATAL_EDUMP_TABLE_STAT_NF_SUCCESS_DONE, MPI_FATAL_EDUMP_TABLE_STATUS, MSGU_SCRATCH_PAD_0, MSGU_SCRATCH_PAD_1, MSGU_SCRATCH_PAD_2, MSGU_SCRATCH_PAD_3, ossaHwRegReadExt(), ossaHwRegWriteExt(), agsaForensicData_t::readLen, agsaLLRoot_s::ResetFailed, SA_ASSERT, SA_DBG1, SA_DBG2, SA_DBG3, SCRATCH_PAD1_V_ERROR_STATE, agsaContext_s::sdkData, siGetPciBar(), siGetTableOffset(), siHalRegReadExt(), siPciCpyMem(), siWaitForFatalTransfer(), smTraceFuncEnter, smTraceFuncExit, status, and V_MEMBASE_II_ShiftRegister.
Referenced by siGetForensicData().
LOCAL bit32 siGetForensicData | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
agsaForensicData_t * | forensicData | ||
) |
Definition at line 2857 of file saioctlcmd.c.
References _1M, AGSA_MAX_INBOUND_Q, AGSA_MAX_OUTBOUND_Q, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, BAR_SHIFT_GSM_OFFSET, agsaForensicData_t::BufferType, agsaForensicData_t::dataBuf, agsaForensicData_t::DataType, agsaForensicData_t::directData, agsaForensicData_t::directLen, agsaForensicData_t::directOffset, agsaForensicData_t::gsmBuf, hpDBG_VERY_LOUD, agsaLLRoot_s::inboundQueue, NULL, ONE_MEGABYTE, agsaLLRoot_s::outboundQueue, agsaForensicData_t::queueBuf, agsaForensicData_t::queueIndex, agsaForensicData_t::readLen, SA_DBG1, SA_DBG2, agsaContext_s::sdkData, siBar4Shift(), siDumpInboundQueue(), siDumpOutboundQueue(), siFatalErrorBuffer(), siGSMDump(), siNonFatalErrorBuffer(), SIXTYFOURKBYTE, smIS_SPC(), smTraceFuncEnter, smTraceFuncExit, status, TYPE_FATAL, TYPE_GSM_SPACE, TYPE_INBOUND_QUEUE, TYPE_NON_FATAL, and TYPE_OUTBOUND_QUEUE.
Referenced by saGetForensicData().
bit32 siGetRegisterDumpGSM | ( | agsaRoot_t * | agRoot, |
void * | destinationAddress, | ||
bit32 | regDumpNum, | ||
bit32 | regDumpOffset, | ||
bit32 | len | ||
) |
Initiate a GET REGISTER DUMP from GSM command.
This function is called to Get Register Dump from the GSM of SPC.
agRoot | handles for this instance of SAS/SATA hardware |
destinationAddress | address of the register dump data copied to |
regDumpNum | Register Dump # 0 or 1 |
regDumpOffset | Offset within the register dump area |
len | Length in bytes of the register dump data to copy |
Definition at line 3213 of file saioctlcmd.c.
References agNULL, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, mpiHostLLConfigDescriptor_s::FatalErrorDumpLength0, mpiHostLLConfigDescriptor_s::FatalErrorDumpLength1, mpiHostLLConfigDescriptor_s::FatalErrorDumpOffset0, mpiHostLLConfigDescriptor_s::FatalErrorDumpOffset1, hpDBG_VERY_LOUD, agsaLLRoot_s::mainConfigTable, SA_ASSERT, SA_DBG1, agsaContext_s::sdkData, siGSMDump(), smTraceFuncEnter, and smTraceFuncExit.
Referenced by saHwReset(), siSpcGetErrorContent(), and siSpcvGetErrorContent().
bit32 siGSMDump | ( | agsaRoot_t * | agRoot, |
bit32 | gsmDumpOffset, | ||
bit32 | length, | ||
void * | directData | ||
) |
Dump GSM registers from the controller.
agRoot | Handles for this instance of SAS/SATA hardware |
gsmDumpOffset | Offset of GSM |
length | Max is 1 MB |
directData | address of GSM data dump to |
Definition at line 3693 of file saioctlcmd.c.
References AGSA_RC_FAILURE, AGSA_RC_SUCCESS, ONE_MEGABYTE, ossaHwRegReadExt(), PCIBAR1, PCIBAR2, SA_DBG1, si_memcpy(), siBar4Shift(), smIS_SPC(), and smIS_SPCV().
Referenced by saGetRegisterDump(), siGetForensicData(), and siGetRegisterDumpGSM().
LOCAL bit32 siNonFatalErrorBuffer | ( | agsaRoot_t * | agRoot, |
agsaForensicData_t * | forensicData | ||
) |
Definition at line 2675 of file saioctlcmd.c.
References agsaMemoryRequirement_s::agMemory, agNULL, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agsaForensicData_t::BufferType, agsaForensicData_t::dataBuf, agsaForensicData_t::directData, agsaForensicData_t::directLen, agsaForensicData_t::directOffset, agsaLLRoot_s::ForensicLastOffset, HDA_DMA_BUFFER, hpDBG_VERY_LOUD, MAIN_MERRDCTO_MERRDCES, MAKE_MODULO, agsaLLRoot_s::memoryAllocated, MPI_FATAL_EDUMP_TABLE_ACCUM_LEN, MPI_FATAL_EDUMP_TABLE_HI_OFFSET, MPI_FATAL_EDUMP_TABLE_LENGTH, MPI_FATAL_EDUMP_TABLE_LO_OFFSET, MPI_FATAL_EDUMP_TABLE_STAT_DMA_FAILED, MPI_FATAL_EDUMP_TABLE_STAT_NF_SUCCESS_DONE, MPI_FATAL_EDUMP_TABLE_STAT_NF_SUCCESS_MORE_DATA, MPI_FATAL_EDUMP_TABLE_STATUS, ossaHwRegReadExt(), ossaHwRegWriteExt(), ossaStallThread(), agsaMem_s::phyAddrLower, agsaMem_s::phyAddrUpper, agsaForensicData_t::readLen, SA_ASSERT, SA_DBG1, SA_DBG2, SA_DBG3, SA_DBG4, agsaContext_s::sdkData, si_memcpy(), si_memset(), siGetPciBar(), siGetTableOffset(), siWaitForNonFatalTransfer(), smTraceFuncEnter, smTraceFuncExit, status, agsaMem_s::totalLength, V_Scratchpad_Rsvd_0_Register, agsaMem_s::virtPtr, and WAIT_INCREMENT.
Referenced by siGetForensicData().
LOCAL void siSpcGetErrorContent | ( | agsaRoot_t * | agRoot | ) |
for spc card read Error Registers to memory if error occur
This function is called to get erorr registers content to memory if error occur.
agRoot | handles for this instance of SAS/SATA hardware |
Definition at line 2276 of file saioctlcmd.c.
References mpiHostLLConfigDescriptor_s::FatalErrorDumpLength0, mpiHostLLConfigDescriptor_s::FatalErrorDumpLength1, GEN_MSGU_SCRATCH_PAD_1, GEN_MSGU_SCRATCH_PAD_2, agsaLLRoot_s::mainConfigTable, MSGU_SCRATCH_PAD_1, MSGU_SCRATCH_PAD_2, REG_DUMP_NUM0, REG_DUMP_NUM1, agsaLLRoot_s::registerDump0, agsaLLRoot_s::registerDump1, SCRATCH_PAD1_ERR, SCRATCH_PAD2_ERR, SCRATCH_PAD_STATE_MASK, agsaContext_s::sdkData, siGetRegisterDumpGSM(), and siHalRegReadExt().
Referenced by saGetRegisterDump().
LOCAL void siSpcvGetErrorContent | ( | agsaRoot_t * | agRoot | ) |
for spcv card read Error Registers to memory if error occur
This function is called to get erorr registers content to memory if error occur.
agRoot | handles for this instance of SAS/SATA hardware |
Definition at line 2309 of file saioctlcmd.c.
References mpiHostLLConfigDescriptor_s::FatalErrorDumpLength0, mpiHostLLConfigDescriptor_s::FatalErrorDumpLength1, GEN_MSGU_SCRATCH_PAD_1, hpDBG_VERY_LOUD, agsaLLRoot_s::mainConfigTable, MSGU_SCRATCH_PAD_1, REG_DUMP_NUM0, REG_DUMP_NUM1, agsaLLRoot_s::registerDump0, agsaLLRoot_s::registerDump1, agsaContext_s::sdkData, siGetRegisterDumpGSM(), siHalRegReadExt(), smTraceFuncEnter, smTraceFuncExit, SPCV_ERROR_VALUE, SPCV_IOP0_STATE_MASK, SPCV_IOP1_STATE_MASK, and SPCV_RAAE_STATE_MASK.
Referenced by saGetRegisterDump().
LOCAL bit32 siWaitForFatalTransfer | ( | agsaRoot_t * | agRoot, |
bit32 | pcibar | ||
) |
Definition at line 2396 of file saioctlcmd.c.
References AGSA_RC_FAILURE, AGSA_RC_SUCCESS, hpDBG_VERY_LOUD, MAIN_MERRDCTO_MERRDCES, MAKE_MODULO, MPI_FATAL_EDUMP_HANDSHAKE_RDY, MPI_FATAL_EDUMP_TABLE_ACCUM_LEN, MPI_FATAL_EDUMP_TABLE_HANDSHAKE, MPI_FATAL_EDUMP_TABLE_STATUS, ossaHwRegReadExt(), ossaHwRegWriteExt(), ossaStallThread(), SA_DBG1, SA_DBG4, siGetTableOffset(), smTraceFuncEnter, smTraceFuncExit, status, and WAIT_INCREMENT.
Referenced by siFatalErrorBuffer().
LOCAL bit32 siWaitForNonFatalTransfer | ( | agsaRoot_t * | agRoot, |
bit32 | pcibar | ||
) |
Definition at line 2360 of file saioctlcmd.c.
References AGSA_RC_FAILURE, AGSA_RC_SUCCESS, hpDBG_VERY_LOUD, MAKE_MODULO, ossaHwRegReadExt(), ossaHwRegWriteExt(), ossaStallThread(), SA_DBG1, SA_DBG4, smTraceFuncEnter, smTraceFuncExit, SPCV_MSGU_CFG_TABLE_TRANSFER_DEBUG_INFO, status, V_Inbound_Doorbell_Set_Register, and WAIT_INCREMENT.
Referenced by siNonFatalErrorBuffer().
|
extern |
Definition at line 55 of file sahw.c.
Referenced by saGetControllerInfo().