FreeBSD kernel pms device code
|
The file implements the functions to do SAS/SATA discovery. 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 | saDiscover (agsaRoot_t *agRoot, agsaPortContext_t *agPortContext, bit32 type, bit32 option) |
Start/Abort SAS/SATA discovery. More... | |
GLOBAL bit32 | saDeregisterDeviceHandle (agsaRoot_t *agRoot, agsaContext_t *agContext, agsaDevHandle_t *agDevHandle, bit32 queueNum) |
Function for target to remove stale initiator device handle. More... | |
GLOBAL bit32 | siRemoveDevHandle (agsaRoot_t *agRoot, agsaDevHandle_t *agDevHandle) |
Function for target to remove stale initiator device handle. More... | |
GLOBAL bit32 | saGetDeviceHandles (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaPortContext_t *agPortContext, bit32 flags, agsaDevHandle_t *agDev[], bit32 skipCount, bit32 MaxDevs) |
Get Device Handles from a specific local port. More... | |
GLOBAL bit32 | saRegisterNewDevice (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaDeviceInfo_t *agDeviceInfo, agsaPortContext_t *agPortContext, bit16 hostAssignedDeviceId) |
Register New Device from a specific local port. More... | |
GLOBAL bit32 | saRegisterEventCallback (agsaRoot_t *agRoot, bit32 eventSourceType, ossaGenericCB_t callbackPtr) |
Register a callback for a specific event. More... | |
GLOBAL bit32 | saGetDeviceInfo (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 option, bit32 queueNum, agsaDevHandle_t *agDevHandle) |
Get Device Information. More... | |
GLOBAL bit32 | saSetDeviceInfo (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaDevHandle_t *agDevHandle, bit32 option, bit32 param, ossaSetDeviceInfoCB_t agCB) |
Set Device Information. More... | |
GLOBAL bit32 | saGetDeviceState (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaDevHandle_t *agDevHandle) |
Get Device State. More... | |
GLOBAL bit32 | saSetDeviceState (agsaRoot_t *agRoot, agsaContext_t *agContext, bit32 queueNum, agsaDevHandle_t *agDevHandle, bit32 newDeviceState) |
Set Device State. More... | |
The file implements the functions to do SAS/SATA discovery.
Definition in file sadisc.c.
__FBSDID | ( | "$FreeBSD$" | ) |
GLOBAL bit32 saDeregisterDeviceHandle | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
agsaDevHandle_t * | agDevHandle, | ||
bit32 | queueNum | ||
) |
Function for target to remove stale initiator device handle.
function is called to ask the LL layer to remove all LL layer and SPC firmware internal resources associated with a device handle
agRoot | Handles for this instance of SAS/SATA hardware |
agDevHandle | Handle of the device that this I/O request will be made on |
Definition at line 83 of file sadisc.c.
References agNULL, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, DEVICE_ID_BITS, agsaDeviceMap_s::DeviceHandle, agsaDeviceMap_s::DeviceIdFromFW, agsaLLRoot_s::DeviceMap, agsaDeviceDesc_s::DeviceMapIndex, hpDBG_VERY_LOUD, MAX_IO_DEVICE_ENTRIES, mpiDeregDevHandleCmd(), OS_ASSERT, agsaPort_s::portId, agsaDeviceDesc_s::pPort, SA_DBG1, SA_DBG3, agsaContext_s::sdkData, smTraceFuncEnter, and smTraceFuncExit.
Referenced by ossaDeviceRegistrationCB(), ossaSMPAbortCB(), and tdsaDeregisterDevicesInPort().
GLOBAL bit32 saDiscover | ( | agsaRoot_t * | agRoot, |
agsaPortContext_t * | agPortContext, | ||
bit32 | type, | ||
bit32 | option | ||
) |
Start/Abort SAS/SATA discovery.
Start/Abort SAS/SATA discovery
agRoot | Handles for this instance of SAS/SATA hardware |
agPortContext | Pointer to this instance of port context |
type | Specifies the type(s) of discovery operation to start or cancel |
option | Specified the discovery option |
Definition at line 57 of file sadisc.c.
References AGSA_RC_FAILURE.
Referenced by ossaHwCB(), and tiINIDiscoverTargets().
GLOBAL bit32 saGetDeviceHandles | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaPortContext_t * | agPortContext, | ||
bit32 | flags, | ||
agsaDevHandle_t * | agDev[], | ||
bit32 | skipCount, | ||
bit32 | MaxDevs | ||
) |
Get Device Handles from a specific local port.
Get a Device Handles
agRoot | Handles for this instance of SAS/SATA hardware |
agsaContext | Pointer to this API context |
agPortContext | Pointer to this instance of port context |
flags | Device flags |
agDev[] | Pointer of array of device handles |
MaxDevs | Specified Maximum number of Device Handles |
Definition at line 243 of file sadisc.c.
References agNULL, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agsaLLRoot_s::DeviceHandle, flags, hpDBG_VERY_LOUD, mpiGetDeviceHandleCmd(), OS_ASSERT, agsaPort_s::portId, SA_DBG1, agsaContext_s::sdkData, smTraceFuncEnter, and smTraceFuncExit.
GLOBAL bit32 saGetDeviceInfo | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | option, | ||
bit32 | queueNum, | ||
agsaDevHandle_t * | agDevHandle | ||
) |
Get Device Information.
Get SAS/SATA device information API
agRoot | Handles for this instance of SAS/SATA hardware |
option | device general information or extended information |
agDevHandle | Pointer of device handle |
Definition at line 609 of file sadisc.c.
References agNULL, AGSA_RC_FAILURE, DEVICE_ID_BITS, agsaDeviceMap_s::DeviceHandle, agsaDeviceMap_s::DeviceIdFromFW, agsaLLRoot_s::DeviceMap, agsaDeviceDesc_s::DeviceMapIndex, hpDBG_VERY_LOUD, mpiGetDeviceInfoCmd(), OS_ASSERT, SA_DBG1, SA_DBG3, agsaContext_s::sdkData, smTraceFuncEnter, and smTraceFuncExit.
Referenced by tiINIGetDeviceInfo().
GLOBAL bit32 saGetDeviceState | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaDevHandle_t * | agDevHandle | ||
) |
Get Device State.
Get SAS/SATA device state API
agRoot | Handles for this instance of SAS/SATA hardware |
agContext | Pointer to this API context |
queueNum | IQ/OQ number |
agDevHandle | Pointer of device handler |
Definition at line 739 of file sadisc.c.
References agNULL, AGSA_RC_FAILURE, DEVICE_ID_BITS, agsaDeviceMap_s::DeviceHandle, agsaDeviceMap_s::DeviceIdFromFW, agsaLLRoot_s::DeviceMap, agsaDeviceDesc_s::DeviceMapIndex, hpDBG_VERY_LOUD, mpiGetDeviceStateCmd(), OS_ASSERT, SA_DBG1, SA_DBG3, agsaContext_s::sdkData, smTraceFuncEnter, and smTraceFuncExit.
GLOBAL bit32 saRegisterEventCallback | ( | agsaRoot_t * | agRoot, |
bit32 | eventSourceType, | ||
ossaGenericCB_t | callbackPtr | ||
) |
Register a callback for a specific event.
Register a callback for a Event API
agRoot | Handles for this instance of SAS/SATA hardware |
eventSourceType | Event Type |
callbackPtr | Function pointer to OS layer |
Definition at line 566 of file sadisc.c.
References AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agsaLLRoot_s::DeviceDeregistrationCB, agsaLLRoot_s::DeviceRegistrationCB, OSSA_EVENT_SOURCE_DEVICE_HANDLE_ADDED, OSSA_EVENT_SOURCE_DEVICE_HANDLE_REMOVED, SA_DBG1, SA_DBG3, and agsaContext_s::sdkData.
Referenced by tiCOMPortInit().
GLOBAL bit32 saRegisterNewDevice | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaDeviceInfo_t * | agDeviceInfo, | ||
agsaPortContext_t * | agPortContext, | ||
bit16 | hostAssignedDeviceId | ||
) |
Register New Device from a specific local port.
Register New Device API
agRoot | Handles for this instance of SAS/SATA hardware |
agContext | Pointer to this API context |
agDeviceInfo | Pointer to this instance of device info |
agPortContext | Pointer to this instance of port context |
Definition at line 302 of file sadisc.c.
References agsaIOMap_s::agContext, agFALSE, agNULL, AGSA_RC_BUSY, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agTRUE, ATAPI_DEVICE_FLAG, AWT_DEVICE_FLAG, DEV_INFO_IR_SHIFT, DEV_INFO_MASK, DEV_INFO_MCN_SHIFT, DEV_LINK_RATE, agsaSASIdentify_s::deviceType_addressFrameType, agsaDeviceInfo_s::devType_S_Rate, agsaDeviceInfo_s::firstBurstSize, agsaDeviceInfo_s::flag, agsaLLRoot_s::freeIORequests, agsaLLRoot_s::freeReservedRequests, hpDBG_VERY_LOUD, agsaIORequestDesc_s::HTag, agsaLLRoot_s::IOMap, IOMB_SIZE64, agsaIOMap_s::IORequest, agsaDeviceInfo_s::it_NexusTimeout, agsaIORequestDesc_s::linkNode, LL_IOREQ_LOCKEQ_LOCK, MARK_OFF, MPI_CATEGORY_SAS_SATA, mpiBuildCmd(), OPC_INB_REG_DEV, OPC_INB_SPC_REG_DEV, OS_ASSERT, OSSA_OFFSET_OF, ossaSingleThreadedEnter(), ossaSingleThreadedLeave(), agsaIORequestDesc_s::pDevice, agsaPort_s::portId, PORTID_MASK, SA_DBG1, SA_DBG2, SA_DBG3, SA_RESERVED_REQUEST_COUNT, saLlistIOAdd, saLlistIOGetCount, saLlistIOGetHead, saLlistIORemove, agsaDeviceInfo_s::sasAddressHi, agsaSASIdentify_s::sasAddressHi, agsaDeviceInfo_s::sasAddressLo, agsaSASIdentify_s::sasAddressLo, agsaRegDevCmd_s::sasAddrHi, agsaRegDevCmd_s::sasAddrLo, agsaContext_s::sdkData, SHIFT2, SHIFT24, SHIFT31, SHIFT4, SHIFT9, si_memset(), siPortSASDeviceAdd(), siPortSATADeviceAdd(), smIS_SPC(), agsaDeviceInfo_s::smpTimeout, smTrace, smTraceFuncEnter, smTraceFuncExit, agsaIOMap_s::Tag, agsaIORequestDesc_s::valid, and XFER_RDY_PRIORTY_DEVICE_FLAG.
Referenced by ossaDeviceRegistrationCB(), and tdssAddSASToSharedcontext().
GLOBAL bit32 saSetDeviceInfo | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaDevHandle_t * | agDevHandle, | ||
bit32 | option, | ||
bit32 | param, | ||
ossaSetDeviceInfoCB_t | agCB | ||
) |
Set Device Information.
Set SAS/SATA device information API
agRoot | Handles for this instance of SAS/SATA hardware |
agContext | Pointer to this API context |
queueNum | IQ/OQ number |
agDevHandle | Pointer of device handle |
option | device general information or extended information |
param | Parameter of Set Device Infomation |
Definition at line 672 of file sadisc.c.
References agNULL, AGSA_RC_FAILURE, DEVICE_ID_BITS, agsaDeviceMap_s::DeviceHandle, agsaDeviceMap_s::DeviceIdFromFW, agsaLLRoot_s::DeviceMap, agsaDeviceDesc_s::DeviceMapIndex, hpDBG_VERY_LOUD, mpiSetDeviceInfoCmd(), agsaDeviceDesc_s::option, OS_ASSERT, agsaDeviceDesc_s::param, SA_DBG1, SA_DBG2, SA_DBG3, agsaContext_s::sdkData, smTraceFuncEnter, and smTraceFuncExit.
Referenced by itdssOpenCnxErrorConnectionRateNotSupportedHandler(), and ossaDeviceHandleAccept().
GLOBAL bit32 saSetDeviceState | ( | agsaRoot_t * | agRoot, |
agsaContext_t * | agContext, | ||
bit32 | queueNum, | ||
agsaDevHandle_t * | agDevHandle, | ||
bit32 | newDeviceState | ||
) |
Set Device State.
Set SAS/SATA device state API
agRoot | Handles for this instance of SAS/SATA hardware |
agContext | Pointer to this API context |
queueNum | IQ/OQ number |
agDevHandle | Pointer of device handler |
newDeviceState | new device state |
Definition at line 801 of file sadisc.c.
References agNULL, AGSA_RC_FAILURE, DEVICE_ID_BITS, agsaDeviceMap_s::DeviceHandle, agsaDeviceMap_s::DeviceIdFromFW, agsaLLRoot_s::DeviceMap, agsaDeviceDesc_s::DeviceMapIndex, hpDBG_VERY_LOUD, mpiSetDeviceStateCmd(), OS_ASSERT, SA_DBG1, SA_DBG3, agsaContext_s::sdkData, smTraceFuncEnter, and smTraceFuncExit.
Referenced by itdssDsNonOperationalHandler(), itdssTaskCompleted(), ossaHwCB(), ossaLocalPhyControlCB(), smLocalPhyControlCB(), smPhyControlRespRcvd(), smsatDelayedProcessAbnormalCompletion(), smsatIDStartCB(), smsatProcessAbnormalCompletion(), smSMPCompleted(), smTaskManagement(), and tdsaPhyControlRespRcvd().
GLOBAL bit32 siRemoveDevHandle | ( | agsaRoot_t * | agRoot, |
agsaDevHandle_t * | agDevHandle | ||
) |
Function for target to remove stale initiator device handle.
function is called to ask the LL layer to remove all LL layer internal resources associated with a device handle
agRoot | Handles for this instance of SAS/SATA hardware |
agDevHandle | Handle of the device that this I/O request will be made on |
Definition at line 158 of file sadisc.c.
References agFALSE, agNULL, AGSA_RC_FAILURE, AGSA_RC_SUCCESS, agTRUE, agsaDeviceDesc_s::deviceType, DIRECT_SATA_DEVICE, hpDBG_VERY_LOUD, agsaDeviceDesc_s::initiatorDevHandle, OS_ASSERT, agsaDeviceDesc_s::pPort, SA_ASSERT, SA_DBG1, SA_DBG3, agsaContext_s::sdkData, siPortDeviceRemove(), smTraceFuncEnter, smTraceFuncExit, SSP_SMP_DEVICE, STP_DEVICE, and agsaDeviceDesc_s::targetDevHandle.
Referenced by mpiDeregDevHandleRsp().