FreeBSD kernel pms device code
sasmp.c File Reference

The file implements the functions for SMP request/response. More...

#include <sys/cdefs.h>
#include <dev/pms/config.h>
#include <dev/pms/RefTisa/sallsdk/spc/saglobal.h>
Include dependency graph for sasmp.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
GLOBAL bit32 saSMPStart (agsaRoot_t *agRoot, agsaIORequest_t *agIORequest, bit32 queueNum, agsaDevHandle_t *agDevHandle, bit32 agRequestType, agsaSASRequestBody_t *agRequestBody, ossaSMPCompletedCB_t agCB)
 Start SMP request. More...
 
GLOBAL bit32 saSMPAbort (agsaRoot_t *agRoot, agsaIORequest_t *agIORequest, bit32 queueNum, agsaDevHandle_t *agDevHandle, bit32 flag, void *abortParam, ossaGenericAbortCB_t agCB)
 Abort SMP request. More...
 

Detailed Description

The file implements the functions for SMP request/response.

Definition in file sasmp.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ saSMPAbort()

GLOBAL bit32 saSMPAbort ( agsaRoot_t agRoot,
agsaIORequest_t agIORequest,
bit32  queueNum,
agsaDevHandle_t agDevHandle,
bit32  flag,
void *  abortParam,
ossaGenericAbortCB_t  agCB 
)

Abort SMP request.

Abort SMP request

Parameters
agRoothandles for this instance of SAS/SATA hardware
queueNum
agIORequest
Returns
If request is aborted successfully
  • AGSA_RC_SUCCESS request is aborted successfully
  • AGSA_RC_FAILURE request is not aborted successfully

Definition at line 517 of file sasmp.c.

References ABORT_ALL, ABORT_MASK, ABORT_SINGLE, agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, AGSA_SMP_REQTYPE, agTRUE, agsaIORequestDesc_s::completionCB, agsaSMPAbortCmd_s::deviceId, agsaDeviceDesc_s::DeviceMapIndex, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaSMPAbortCmd_s::HTagAbort, agsaLLRoot_s::IOMap, IOMB_SIZE64, agsaIOMap_s::IORequest, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, MPI_CATEGORY_SAS_SATA, mpiBuildCmd(), NULL, OPC_INB_SMP_ABORT, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), agsaIORequestDesc_s::pDevice, agsaDeviceDesc_s::pendingIORequests, agsaIORequestDesc_s::pIORequestContext, agsaIORequestDesc_s::requestType, SA_ASSERT, SA_DBG1, SA_DBG3, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, smTraceFuncEnter, smTraceFuncExit, agsaIORequestDesc_s::startTick, agsaSMPAbortCmd_s::tag, agsaIOMap_s::Tag, agsaLLRoot_s::timeTick, and agsaIORequestDesc_s::valid.

Referenced by tdsaAbortAll().

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

◆ saSMPStart()

GLOBAL bit32 saSMPStart ( agsaRoot_t agRoot,
agsaIORequest_t agIORequest,
bit32  queueNum,
agsaDevHandle_t agDevHandle,
bit32  agRequestType,
agsaSASRequestBody_t agRequestBody,
ossaSMPCompletedCB_t  agCB 
)

Start SMP request.

Start SMP request

Parameters
agRoothandles for this instance of SAS/SATA hardware
queueNum
agIORequest
agDevHandle
agRequestType
agRequestBody
agCBSpc - support direct mode direct response SpcV - support direct mode direct response SpcV - support indirect mode direct response SpcV - support indirect mode indirect response
Returns
If request is started successfully
  • AGSA_RC_SUCCESS request is started successfully
  • AGSA_RC_BUSY No resource available, try again later

Definition at line 62 of file sasmp.c.

References agFALSE, agNULL, AGSA_MAX_INBOUND_Q, AGSA_MAX_SMPPAYLOAD_VIA_SFO, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, AGSA_SMP_INIT_REQ, agTRUE, agsaIORequestDesc_s::completionCB, agsaDeviceDesc_s::DeviceMapIndex, DIRECT_MODE, agsaSMPFrame_s::expectedRespLen, 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, agsaPort_s::portId, agsaDeviceDesc_s::pPort, agsaIORequestDesc_s::pPort, agsaIORequestDesc_s::requestType, SA_ASSERT, SA_DBG1, SA_DBG2, SA_DBG4, saLlistIOAdd, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, SHIFT16, si_memcpy(), si_memset(), smIS_SPC(), agsaSMPCmd_s::SMPCmd, agsaSASRequestBody_u::smpFrame, smpFrameFlagIndirectPayload, smpFrameFlagIndirectResponse, smTraceFuncEnter, smTraceFuncExit, agsaIORequestDesc_s::startTick, agsaIOMap_s::Tag, agsaLLRoot_s::timeTick, and agsaIORequestDesc_s::valid.

Referenced by smPhyControlSend(), tiINISMPStart(), ttdsaDiscoverRespSend(), ttdsaNotSupportRespSend(), and ttdsaReportGeneralRespSend().

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