FreeBSD kernel pms device code
|
The file implements the functions to Start, Stop a phy. 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.
Functions | |
__FBSDID ("$FreeBSD$") | |
GLOBAL bit32 | saPhyStart (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, bit32 phyId, agsaPhyConfig_t *agPhyConfig, agsaSASIdentify_t *agSASIdentify) |
Start a Phy. More... | |
GLOBAL bit32 | saPhyStop (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, bit32 phyId) |
Stop a Phy. More... | |
GLOBAL bit32 | siPhyStopCB (agsaRoot_t *agRoot, bit32 phyId, bit32 status, agsaContext_t *agContext, bit32 portId, bit32 npipps) |
CallBack Routine to stop a Phy. More... | |
GLOBAL bit32 | saLocalPhyControl (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, bit32 phyId, bit32 phyOperation, ossaLocalPhyControlCB_t agCB) |
Initiate a Local PHY control command. More... | |
GLOBAL bit32 | saGetPhyProfile (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, bit32 ppc, bit32 phyId) |
GLOBAL bit32 | saSetPhyProfile (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, bit32 ppc, bit32 length, void *buffer, bit32 phyID) |
GLOBAL bit32 | saHwEventAck (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaEventSource_t *eventSource, bit32 param0, bit32 param1) |
Initiate a HW Event Ack command. More... | |
GLOBAL bit32 | saVhistCapture (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, bit32 Channel, bit32 NumBitLo, bit32 NumBitHi, bit32 PcieAddrLo, bit32 PcieAddrHi, bit32 ByteCount) |
Variables | |
bit32 | gFPGA_TEST |
The file implements the functions to Start, Stop a phy.
Definition in file saphy.c.
__FBSDID | ( | "$FreeBSD$" | ) |
GLOBAL bit32 saGetPhyProfile | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | ppc, | ||
bit32 | phyId | ||
) |
Definition at line 823 of file saphy.c.
References agFALSE, agNULL, AGSA_PHY_RATE_CONTROL_PAGE, AGSA_PHY_SNW3_PAGE, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, AGSA_SAS_PHY_ANALOG_SETTINGS_PAGE, AGSA_SAS_PHY_BW_COUNTERS_PAGE, AGSA_SAS_PHY_ERR_COUNTERS_CLR_PAGE, AGSA_SAS_PHY_ERR_COUNTERS_PAGE, AGSA_SAS_PHY_GENERAL_STATUS_PAGE, AGSA_SAS_PHY_OPEN_REJECT_RETRY_BACKOFF_THRESHOLD_PAGE, hpDBG_VERY_LOUD, mpiGetPhyProfileCmd(), OSSA_FAILURE, ossaGetPhyProfileCB(), agsaLLRoot_s::phyCount, SA_ASSERT, SA_DBG1, SA_DBG3, agsaContext_s::sdkData, si_memset(), smIS_SPCV(), and smTraceFuncExit.
Referenced by tdsaGetPhyGeneralStatusIoctl(), tdsaPhyProfileIoctl(), and tiCOMPortStop().
GLOBAL bit32 saHwEventAck | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaEventSource_t * | eventSource, | ||
bit32 | param0, | ||
bit32 | param1 | ||
) |
Initiate a HW Event Ack command.
This function is called to initiate a HW Event Ack command to the SPC. The completion of this function is reported in ossaHwEventAckCB().
agRoot | handles for this instance of SAS/SATA hardware |
agContext | the context of this API |
queueNum | queue number |
eventSource | point to the event source structure |
param0 | |
param1 |
Definition at line 1004 of file saphy.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, agsaEventSource_s::agPortContext, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agTRUE, agsaEventSource_s::event, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaIORequestDesc_s::HwAckType, 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_HW_EVENT_ACK, OPC_INB_SPC_SAS_HW_EVENT_ACK, OSSA_HW_EVENT_PHY_DOWN, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), agsaEventSource_s::param, agsaPort_s::portId, agsaIORequestDesc_s::pPort, SA_ASSERT, SA_DBG1, SA_DBG2, SA_DBG3, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, SHIFT24, SHIFT8, si_memset(), smIS_SPC(), smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, agsaPort_s::tobedeleted, and agsaIORequestDesc_s::valid.
Referenced by ossaDeregisterDeviceHandleCB(), and ossaHwCB().
GLOBAL bit32 saLocalPhyControl | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | phyId, | ||
bit32 | phyOperation, | ||
ossaLocalPhyControlCB_t | agCB | ||
) |
Initiate a Local PHY control command.
This function is called to initiate a PHY control command to the local PHY. The completion of this function is reported in ossaLocalPhyControlCB()
agRoot | handles for this instance of SAS/SATA hardware |
agContext | the context of this API |
phyId | phy number |
phyOperation | one of AGSA_PHY_LINK_RESET, AGSA_PHY_HARD_RESET, AGSA_PHY_ENABLE_SPINUP |
Definition at line 420 of file saphy.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_PHY_BROADCAST_ASYNCH_EVENT, AGSA_PHY_CLEAR_ERROR_COUNTS, AGSA_PHY_COMINIT_OOB, AGSA_PHY_GET_BW_COUNTS, AGSA_PHY_GET_ERROR_COUNTS, AGSA_PHY_HARD_RESET, AGSA_PHY_LINK_RESET, AGSA_PHY_NOTIFY_ENABLE_SPINUP, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agTRUE, agsaPhyErrCounters_s::codeViolation, agsaIORequestDesc_s::completionCB, DEVICE_LCLK_CLEAR, agsaPhyErrCounters_s::elasticityBufferOverflow, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaPhyErrCounters_s::inboundCRCError, agsaPhyErrCounters_s::invalidDword, agsaLLRoot_s::IOMap, agsaIOMap_s::IORequest, LCLK, LCLK_CLEAR, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, agsaPhyErrCounters_s::lossOfDwordSynch, MARK_OFF, mpiLocalPhyControlCmd(), OSSA_FAILURE, OSSA_SUCCESS, ossaHwRegReadExt(), ossaHwRegWriteExt(), ossaLocalPhyControlCB(), ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), PCIBAR2, agsaLLRoot_s::phyCount, agsaPhyErrCounters_s::phyResetProblem, agsaPhyErrCounters_s::receivedErrorPrimitive, agsaPhyErrCounters_s::runningDisparityError, SA_ASSERT, SA_DBG1, SA_DBG2, SA_DBG3, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, si_memset(), siBar4Shift(), smIS_SPC(), smIS_SPCV(), smTraceFuncEnter, smTraceFuncExit, SPC_READ_CODE_VIO_COUNT, SPC_READ_COUNTER_CNTL, SPC_READ_DISP_ERR_COUNT, SPC_READ_INV_DW_COUNT, SPC_READ_LOSS_DW_COUNT, SPC_READ_PHY_RESET_COUNT, SPC_REG_DEVICE_LCLK, SPC_WRITE_COUNTER_CNTL, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
Referenced by itdssIOSuccessHandler(), ossaHwCB(), smTaskManagement(), tdsaPhyProfileIoctl(), and tiCOMPortStop().
GLOBAL bit32 saPhyStart | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | phyId, | ||
agsaPhyConfig_t * | agPhyConfig, | ||
agsaSASIdentify_t * | agSASIdentify | ||
) |
Start a Phy.
Start a Phy
agRoot | handles for this instance of SAS/SATA hardware |
agContext | |
phyId | the phy id of the link will be started |
agPhyConfig | the phy configuration |
agSASIdentify | the SAS identify frame will be sent by the phy |
Definition at line 60 of file saphy.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, agsaIOMap_s::IORequest, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, mpiPhyStartCmd(), ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), agsaLLRoot_s::phyCount, SA_ASSERT, SA_DBG1, SA_DBG3, SA_IDFRM_GET_SAS_ADDRESSHI, SA_IDFRM_GET_SAS_ADDRESSLO, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, smTrace, smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
Referenced by tiCOMPortStart().
GLOBAL bit32 saPhyStop | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | phyId | ||
) |
Stop a Phy.
Stop a Phy
agRoot | handles for this instance of SAS/SATA hardware |
agContext | the context of this API |
phyId | the phy id of the link will be stopped |
Definition at line 183 of file saphy.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, mpiOCQueue_s::agRoot, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agTRUE, mpiOCQueue_s::consumerIdx, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::IOMap, agsaIOMap_s::IORequest, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, mpiPhyStopCmd(), agsaQueueConfig_s::numOutboundQueues, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), agsaLLRoot_s::outboundQueue, agsaLLRoot_s::phyCount, mpiOCQueue_s::piPointer, mpiOCQueue_s::producerIdx, agsaLLRoot_s::QueueConfig, SA_ASSERT, SA_DBG1, SA_DBG2, SA_DBG4, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, smIS_SPC(), smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
Referenced by tiCOMPortStop().
GLOBAL bit32 saSetPhyProfile | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | ppc, | ||
bit32 | length, | ||
void * | buffer, | ||
bit32 | phyID | ||
) |
Definition at line 936 of file saphy.c.
References agFALSE, AGSA_PHY_RATE_CONTROL_PAGE, AGSA_PHY_SNW3_PAGE, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, AGSA_SAS_PHY_ANALOG_SETTINGS_PAGE, AGSA_SAS_PHY_MISC_PAGE, mpiSetPhyProfileCmd(), SA_ASSERT, and SA_DBG1.
Referenced by ossaGetPhyProfileCB().
GLOBAL bit32 saVhistCapture | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
bit32 | Channel, | ||
bit32 | NumBitLo, | ||
bit32 | NumBitHi, | ||
bit32 | PcieAddrLo, | ||
bit32 | PcieAddrHi, | ||
bit32 | ByteCount | ||
) |
Definition at line 1205 of file saphy.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_RC_BUSY, AGSA_RC_SUCCESS, agTRUE, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::IOMap, agsaIOMap_s::IORequest, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, mpiVHistCapCmd(), ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), SA_ASSERT, SA_DBG1, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaContext_s::sdkData, smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, and agsaIORequestDesc_s::valid.
GLOBAL bit32 siPhyStopCB | ( | agsaRoot_t * | agRoot, |
bit32 | phyId, | ||
bit32 | status, | ||
agsaContext_t * | agContext, | ||
bit32 | portId, | ||
bit32 | npipps | ||
) |
CallBack Routine to stop a Phy.
CallBack for Stop a Phy
agRoot | handles for this instance of SAS/SATA hardware |
phyId | the phy id of the link will be stopped |
status | the status of the phy |
agContext | the context of the saPhyStop |
Definition at line 314 of file saphy.c.
References agFALSE, agNULL, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, hpDBG_VERY_LOUD, LL_PORT_LOCK, OSSA_HW_EVENT_PHY_STOP_STATUS, OSSA_PORT_INVALID, OSSA_SUCCESS, ossaHwCB(), ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), PHY_STATUS_SET, PHY_STOPPED, agsaLLRoot_s::phyCount, agsaPort_s::phyMap, agsaLLRoot_s::phys, PORT_INVALIDATING, PORT_MARK_OFF, PORT_STATE_MASK, agsaPort_s::portContext, agsaPortMap_s::PortContext, agsaPort_s::portId, agsaPortMap_s::PortID, agsaLLRoot_s::PortMap, agsaPortMap_s::PortStatus, agsaPhy_s::pPort, SA_ASSERT, SA_DBG1, agsaContext_s::sdkData, SHIFT16, SHIFT8, siPortInvalid(), smTraceFuncEnter, smTraceFuncExit, status, and agsaPort_s::status.
Referenced by mpiHWevent().