FreeBSD kernel pms device code
saioctlcmd.c File Reference

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>
Include dependency graph for saioctlcmd.c:

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_tsaGetRequestFromFreePool (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
 

Detailed Description

The file implements the functions of IOCTL MPI Command/Response to/from SPC.

Definition in file saioctlcmd.c.

Macro Definition Documentation

◆ _1M

#define _1M   0x100000

◆ LEFT_BYTE_FAIL

#define LEFT_BYTE_FAIL (   x,
 
)     do {if( (x) < (v) ) return AGSA_RC_FAILURE; } while(0);

Definition at line 2335 of file saioctlcmd.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ mpiFwExtFlashUpdateRsp()

◆ mpiFwFlashUpdateRsp()

GLOBAL bit32 mpiFwFlashUpdateRsp ( agsaRoot_t agRoot,
agsaFwFlashUpdateRsp_t payload 
)

SPC FW_FLASH_UPDATE Respond.

This command sends FW Flash Update Status to TD layer.

Parameters
agRootHandles for this instance of SAS/SATA LL
payloadFW download response payload
Returns
If the MPI command is sent to SPC successfully
  • AGSA_RC_SUCCESS the MPI command is successfully
  • AGSA_RC_FAILURE the MPI command is failure

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().

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

◆ saFlashExtExecute()

◆ saFwFlashUpdate()

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.

Parameters
agRootHandles for this instance of SAS/SATA LL
agContextContext of SPC FW Flash Update Command
queueNumInbound/outbound queue number
flashUpdateInfoPointer of flash update information
Returns
If the MPI command is sent to SPC successfully
  • AGSA_RC_SUCCESS the MPI command is successfully
  • AGSA_RC_FAILURE the MPI command is failure

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().

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

◆ saGetControllerEventLogInfo()

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.

Parameters
agRootHandles for this instance of SAS/SATA LL
eventLogInfoevent log information
Returns
If the MPI command is sent to SPC successfully
  • AGSA_RC_SUCCESS the MPI command is successfully
  • AGSA_RC_FAILURE the MPI command is failure

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().

Here is the caller graph for this function:

◆ saGetControllerInfo()

GLOBAL bit32 saGetControllerInfo ( agsaRoot_t agRoot,
agsaControllerInfo_t controllerInfo 
)

SPC Get Controller Information Command.

This command sends Get Controller Information Command to SPC.

Parameters
agRootHandles for this instance of SAS/SATA LL
controllerInfoController Information
Returns
If the MPI command is sent to SPC successfully
  • AGSA_RC_SUCCESS the MPI command is successfully
  • AGSA_RC_FAILURE the MPI command is failure

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().

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

◆ saGetControllerStatus()

GLOBAL bit32 saGetControllerStatus ( agsaRoot_t agRoot,
agsaControllerStatus_t controllerStatus 
)

SPC Get Controller Status Command.

This command sends Get Controller Status Command to SPC.

Parameters
agRootHandles for this instance of SAS/SATA LL
controllerStatuscontroller status
Returns
If the MPI command is sent to SPC successfully
  • AGSA_RC_SUCCESS the MPI command is successfully
  • AGSA_RC_FAILURE the MPI command is failure

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().

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

◆ saGetDFEData()

◆ saGetForensicData()

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().

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

◆ saGetIOErrorStats()

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().

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

◆ saGetIOEventStats()

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().

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

◆ saGetNVMDCommand()

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.

Parameters
agRootHandles for this instance of SAS/SATA LL
agContextContext of SPC FW Flash Update Command
queueNumInbound/outbound queue number
NVMDInfoPointer of NVM Device information
Returns
If the MPI command is sent to SPC successfully
  • AGSA_RC_SUCCESS the MPI command is successfully
  • AGSA_RC_FAILURE the MPI command is failure

Definition at line 3292 of file saioctlcmd.c.

References agNULL, AGSA_RC_SUCCESS, mpiGetNVMDCmd(), and SA_ASSERT.

Referenced by tdsaNVMDGetIoctl().

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

◆ saGetRegisterDump()

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.

Parameters
agRoothandles for this instance of SAS/SATA hardware
agContextthe context of this API
queueNumqueue number
regDumpInforegister dump information
Returns
  • SUCCESS or FAILURE

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().

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

◆ saGetRequestFromFreePool()

agsaIORequestDesc_t * saGetRequestFromFreePool ( agsaRoot_t agRoot,
agsaContext_t agContext 
)

Get a request from free pool.

This function gets a request from free pool

Parameters
agRootHandles for this instance of SAS/SATA LL
agsaContextContext of this command
Returns
  • Pointer to request, in case of success
  • NULL, in case of failure

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().

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

◆ saGetTimeStamp()

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().

Parameters
agRoothandles for this instance of SAS/SATA hardware
agContextthe context of this API
queueNumqueue number
Returns
  • SUCCESS or FAILURE

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.

Here is the call graph for this function:

◆ saGpioEventSetup()

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.

Parameters
agRootHandles for this instance of SAS/SATA LL
agsaContextContext of this command
queueNumQueue number of inbound/outbound queue
gpioEventSetupInfoPointer of Event Setup Information structure
Returns
If the MPI command is sent to SPC successfully
  • AGSA_RC_SUCCESS the MPI command is successfully
  • AGSA_RC_FAILURE the MPI command is failure

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.

Here is the call graph for this function:

◆ saGpioPinSetup()

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.

Parameters
agRootHandles for this instance of SAS/SATA LL
agsaContextContext of this command
queueNumQueue number of inbound/outbound queue
gpioPinSetupInfoPointer of Event Setup Information structure
Returns
If the MPI command is sent to SPC successfully
  • AGSA_RC_SUCCESS the MPI command is successfully
  • AGSA_RC_FAILURE the MPI command is failure

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.

Here is the call graph for this function:

◆ saGpioRead()

GLOBAL bit32 saGpioRead ( agsaRoot_t agRoot,
agsaContext_t agContext,
bit32  queueNum 
)

SPC GPIO Read Command.

This command sends GPIO Read Command to SPC.

Parameters
agRootHandles for this instance of SAS/SATA LL
agsaContextContext of this command
queueNumQueue number of inbound/outbound queue
Returns
If the MPI command is sent to SPC successfully
  • AGSA_RC_SUCCESS the MPI command is successfully
  • AGSA_RC_FAILURE the MPI command is failure

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.

Here is the call graph for this function:

◆ saGpioWrite()

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.

Parameters
agRootHandles for this instance of SAS/SATA LL
agsaContextContext of this command
queueNumQueue number of inbound/outbound queue
gpioWriteMaskGPIO Write Mask
gpioWriteValueGPIO Write Value
Returns
If the MPI command is sent to SPC successfully
  • AGSA_RC_SUCCESS the MPI command is successfully
  • AGSA_RC_FAILURE the MPI command is failure

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.

Here is the call graph for this function:

◆ saPCIeDiagExecute()

◆ saReconfigSASParams()

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.

Parameters
agRootHandles for this instance of SAS/SATA LL
agContextContext of SPC FW Flash Update Command
queueNumInbound/outbound queue number
agSASConfigPointer of SAS Configuration Parameters
Returns
If the MPI command is sent to SPC successfully
  • AGSA_RC_SUCCESS the MPI command is successfully
  • AGSA_RC_FAILURE the MPI command is failure

Definition at line 3654 of file saioctlcmd.c.

References agNULL, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, mpiSasReinitializeCmd(), SA_ASSERT, SA_DBG1, and smIS_SPCV().

Here is the call graph for this function:

◆ saReturnRequestToFreePool()

void saReturnRequestToFreePool ( agsaRoot_t agRoot,
agsaIORequestDesc_t pRequest 
)

Return request to free pool.

This function returns the request to free pool

Parameters
agRootHandles for this instance of SAS/SATA LL
pRequestRequest to be returned
Returns
NA

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().

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

◆ saSASDiagExecute()

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.

Parameters
agRootHandles for this instance of SAS/SATA LL
agsaContextContext of this command
queueNumQueue number of inbound/outbound queue
diagPointer of SAS Diag Execute Structure
Returns
If the MPI command is sent to SPC successfully
  • AGSA_RC_SUCCESS the MPI command is successfully
  • AGSA_RC_FAILURE the MPI command is failure

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.

Here is the call graph for this function:

◆ saSASDiagStartEnd()

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.

Parameters
agRootHandles for this instance of SAS/SATA LL
agsaContextContext of this command
queueNumQueue number of inbound/outbound queue
phyIdPhy ID
operationOperation of SAS Diagnostic
Returns
If the MPI command is sent to SPC successfully
  • AGSA_RC_SUCCESS the MPI command is successfully
  • AGSA_RC_FAILURE the MPI command is failure

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.

Here is the call graph for this function:

◆ saSendSMPIoctl()

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().

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

◆ saSetNVMDCommand()

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.

Parameters
agRootHandles for this instance of SAS/SATA LL
agContextContext of SPC FW Flash Update Command
queueNumInbound/outbound queue number
NVMDInfoPointer of NVM Device information
Returns
If the MPI command is sent to SPC successfully
  • AGSA_RC_SUCCESS the MPI command is successfully
  • AGSA_RC_FAILURE the MPI command is failure

Definition at line 3327 of file saioctlcmd.c.

References agNULL, AGSA_RC_SUCCESS, mpiSetNVMDCmd(), and SA_ASSERT.

Referenced by tdsaNVMDSetIoctl().

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

◆ saSgpio()

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().

Parameters
agRoothandles for this instance of SAS/SATA hardware
agContextthe context of this API
queueNumqueue number
pSGpioReqPointer to the serial GPIO fields
Returns
  • SUCCESS or FAILURE

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().

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

◆ saUpdateIOMap()

static void saUpdateIOMap ( agsaIOMap_t pIOMap,
bit32  HTag,
agsaIORequestDesc_t pRequest,
agsaContext_t agContext 
)
static

Update IOMap Entry

This function is called to update certain fields of IOMap Entry

Parameters
pIOMapIOMap Entry
HTagHost Tag
pRequestRequest \parma agContext Context of this API
Returns
NA

Definition at line 2086 of file saioctlcmd.c.

References agsaIOMap_s::agContext, agsaIOMap_s::IORequest, and agsaIOMap_s::Tag.

Referenced by saGetRequestFromFreePool(), and saReturnRequestToFreePool().

Here is the caller graph for this function:

◆ siDumpInboundQueue()

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().

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

◆ siDumpOutboundQueue()

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().

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

◆ siFatalErrorBuffer()

◆ siGetForensicData()

◆ siGetRegisterDumpGSM()

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.

Parameters
agRoothandles for this instance of SAS/SATA hardware
destinationAddressaddress of the register dump data copied to
regDumpNumRegister Dump # 0 or 1
regDumpOffsetOffset within the register dump area
lenLength in bytes of the register dump data to copy
Returns
  • SUCCESS or FAILURE

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().

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

◆ siGSMDump()

bit32 siGSMDump ( agsaRoot_t agRoot,
bit32  gsmDumpOffset,
bit32  length,
void *  directData 
)

Dump GSM registers from the controller.

Parameters
agRootHandles for this instance of SAS/SATA hardware
gsmDumpOffsetOffset of GSM
lengthMax is 1 MB
directDataaddress of GSM data dump to
Returns
  • AGSA_RC_SUCCESS saGSMDump is successfully
  • AGSA_RC_FAILURE saGSMDump is not successfully

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().

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

◆ siNonFatalErrorBuffer()

◆ siSpcGetErrorContent()

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.

Parameters
agRoothandles for this instance of SAS/SATA hardware
Returns

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().

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

◆ siSpcvGetErrorContent()

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.

Parameters
agRoothandles for this instance of SAS/SATA hardware
Returns

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().

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

◆ siWaitForFatalTransfer()

◆ siWaitForNonFatalTransfer()

LOCAL bit32 siWaitForNonFatalTransfer ( agsaRoot_t agRoot,
bit32  pcibar 
)

Variable Documentation

◆ gFPGA_TEST

bit32 gFPGA_TEST
extern

Definition at line 56 of file sainit.c.

◆ gWait_2

bit32 gWait_2
extern

Definition at line 55 of file sahw.c.

Referenced by saGetControllerInfo().

◆ gWait_3

bit32 gWait_3
extern

Definition at line 54 of file sahw.c.