FreeBSD kernel pms device code
|
#include <sys/cdefs.h>
#include <dev/pms/config.h>
#include <dev/pms/freebsd/driver/common/osenv.h>
#include <dev/pms/freebsd/driver/common/ostypes.h>
#include <dev/pms/freebsd/driver/common/osdebug.h>
#include <dev/pms/RefTisa/sallsdk/api/sa.h>
#include <dev/pms/RefTisa/sallsdk/api/saapi.h>
#include <dev/pms/RefTisa/sallsdk/api/saosapi.h>
#include <dev/pms/RefTisa/tisa/api/titypes.h>
#include <dev/pms/RefTisa/tisa/api/ostiapi.h>
#include <dev/pms/RefTisa/tisa/api/tiapi.h>
#include <dev/pms/RefTisa/tisa/api/tiglobal.h>
#include <dev/pms/RefTisa/tisa/sassata/sas/common/tdtypes.h>
#include <dev/pms/freebsd/driver/common/osstring.h>
#include <dev/pms/RefTisa/tisa/sassata/common/tdutil.h>
#include <dev/pms/RefTisa/tisa/sassata/common/tdsatypes.h>
#include <dev/pms/RefTisa/tisa/sassata/common/tdproto.h>
Go to the source code of this file.
This file contains initiator discover related functions
Definition in file itddisc.c.
__FBSDID | ( | "$FreeBSD$" | ) |
osGLOBAL bit32 tiINIDiscoverTargets | ( | tiRoot_t * | tiRoot, |
tiPortalContext_t * | portalContext, | ||
bit32 | option | ||
) |
Definition at line 96 of file itddisc.c.
References AG_SA_DISCOVERY_TYPE_SAS, agFALSE, agNULL, tdsaPortContext_s::agPortContext, tdsaPortContext_s::agRoot, agTRUE, tdsaPortContext_s::discoveryOptions, tdsaPortContext_s::DiscoveryState, DM_DISCOVERY_OPTION_FULL_START, dmDiscover(), tdList_s::flink, tdsaPortContext_s::id, ITD_DSTATE_COMPLETED, ITD_DSTATE_NOT_STARTED, ITD_DSTATE_STARTED, ostiInitiatorEvent(), saDiscover(), TD_PORT_LOCK, tiRoot::tdData, TDLIST_EMPTY, TDLIST_OBJECT_BASE, tdsaRoot_s::tdsaAllShared, tdsaSingleThreadedEnter(), tdsaSingleThreadedLeave(), TI_DBG1, TI_DBG2, TI_DBG3, TI_DBG6, tiDiscOK, tiError, tiIntrEventTypeDiscovery, tdsaPortContext_s::tiPortalContext, tiSuccess, and tdsaPortContext_s::valid.
Referenced by agtiapi_DiscoverTgt(), and ostiPortEvent().
osGLOBAL bit32 tiINIGetDeviceHandles | ( | tiRoot_t * | tiRoot, |
tiPortalContext_t * | tiPortalContext, | ||
tiDeviceHandle_t * | tiDev[], | ||
bit32 | maxDevs | ||
) |
Definition at line 245 of file itddisc.c.
References tdsaDeviceData_s::agDevHandle, agFALSE, agNULL, agTRUE, DEVICE_IS_SATA_DEVICE, DEVICE_IS_SSP_TARGET, DEVICE_IS_STP_TARGET, tdsaPortContext_s::discovery, DISCOVERY_IN_PROGRESS, tdsaPortContext_s::DiscoveryState, dmDiscFailed, tdList_s::flink, tdsaDiscovery_s::forcedOK, tdsaDeviceData_s::id, tdsaPortContext_s::id, satDeviceData_t::IDDeviceValid, ITD_DSTATE_COMPLETED, tdsaDeviceData_s::registered, TDSASAddressID_s::sasAddressHi, tdsaDeviceData_s::SASAddressID, TDSASAddressID_s::sasAddressLo, tdsaDeviceData_s::satDevData, satDeviceData_t::satNCQMaxIO, satDeviceData_t::satPendingIO, satDeviceData_t::satPendingNCQIO, satDeviceData_t::satPendingNONNCQIO, TD_ASSERT, TD_PORT_LOCK, tiRoot::tdData, TDLIST_EMPTY, TDLIST_OBJECT_BASE, tdsaDeviceData_s::tdPortContext, tdsaRoot_s::tdsaAllShared, tdsaSingleThreadedEnter(), tdsaSingleThreadedLeave(), TI_DBG1, TI_DBG2, TI_DBG3, TI_DBG6, tdsaDeviceData_s::tiDeviceHandle, tdsaPortContext_s::tiPortalContext, tdsaDeviceData_s::valid, and tdsaPortContext_s::valid.
Referenced by agtiapi_GetDevHandle().
osGLOBAL bit32 tiINIGetDeviceHandlesForWinIOCTL | ( | tiRoot_t * | tiRoot, |
tiPortalContext_t * | tiPortalContext, | ||
tiDeviceHandle_t * | tiDev[], | ||
bit32 | maxDevs | ||
) |
Definition at line 506 of file itddisc.c.
References tdsaDeviceData_s::agDevHandle, agFALSE, agNULL, agTRUE, DEVICE_IS_SATA_DEVICE, DEVICE_IS_SMP_TARGET, DEVICE_IS_SSP_TARGET, DEVICE_IS_STP_TARGET, tdsaPortContext_s::discovery, DISCOVERY_IN_PROGRESS, tdsaPortContext_s::DiscoveryState, dmDiscFailed, tdList_s::flink, tdsaDiscovery_s::forcedOK, tdsaDeviceData_s::id, tdsaPortContext_s::id, satDeviceData_t::IDDeviceValid, ITD_DSTATE_COMPLETED, tdsaDeviceData_s::registered, TDSASAddressID_s::sasAddressHi, tdsaDeviceData_s::SASAddressID, TDSASAddressID_s::sasAddressLo, tdsaDeviceData_s::satDevData, satDeviceData_t::satNCQMaxIO, satDeviceData_t::satPendingIO, satDeviceData_t::satPendingNCQIO, satDeviceData_t::satPendingNONNCQIO, TD_ASSERT, TD_PORT_LOCK, tiRoot::tdData, TDLIST_EMPTY, TDLIST_OBJECT_BASE, tdsaDeviceData_s::tdPortContext, tdsaRoot_s::tdsaAllShared, tdsaSingleThreadedEnter(), tdsaSingleThreadedLeave(), TI_DBG1, TI_DBG2, TI_DBG3, TI_DBG6, tdsaDeviceData_s::tiDeviceHandle, tdsaPortContext_s::tiPortalContext, tdsaDeviceData_s::valid, and tdsaPortContext_s::valid.
Referenced by agtiapi_getdevlist().
osGLOBAL bit32 tiINIGetDeviceInfo | ( | tiRoot_t * | tiRoot, |
tiDeviceHandle_t * | tiDeviceHandle, | ||
tiDeviceInfo_t * | tiDeviceInfo | ||
) |
Definition at line 780 of file itddisc.c.
References tdsaDeviceData_s::agDevHandle, tdsaDeviceData_s::agDeviceInfo, agNULL, tdsaDeviceData_s::agRoot, agTRUE, DEVICE_IS_SATA_DEVICE, DEVICE_IS_STP_TARGET, agsaDeviceInfo_s::devType_S_Rate, tiDetailedDeviceInfo::devType_S_Rate, tdsaDeviceData_s::directlyAttached, tiDeviceInfo::info, tiDeviceInfo::localAddress, tiDeviceInfo::localName, agsaSATAIdentifyData_s::modelNumber, tiDeviceInfo::osAddress1, tiDeviceInfo::osAddress2, osti_memcpy, osti_memset, tdsaDeviceData_s::registered, tiDeviceInfo::remoteAddress, tiDeviceInfo::remoteName, saGetDeviceInfo(), TDSASAddressID_s::sasAddressHi, tdsaDeviceData_s::SASAddressID, TDSASAddressID_s::sasAddressLo, tdsaPortContext_s::sasLocalAddressHi, tdsaPortContext_s::sasLocalAddressLo, tdsaPortContext_s::sasRemoteAddressHi, tdsaPortContext_s::sasRemoteAddressLo, tdsaDeviceData_s::satDevData, satDeviceData_t::satIdentifyData, satDeviceData_t::satNCQ, satDeviceData_t::satNCQMaxIO, agsaSATAIdentifyData_s::serialNumber, satDeviceData_t::SN_id_limit, tiDeviceHandle::tdData, tdsaDeviceData_s::tdPortContext, TI_DBG1, TI_DBG6, tiError, tiInvalidHandle, and tiSuccess.
Referenced by agtiapi_cam_action(), and agtiapi_GetDevHandle().
osGLOBAL void tiIniGetDirectSataSasAddr | ( | tiRoot_t * | tiRoot, |
bit32 | phyId, | ||
bit8 ** | sasAddressHi, | ||
bit8 ** | sasAddressLo | ||
) |
Definition at line 1066 of file itddisc.c.
References agNULL, tiIOCTLPayload_wwn::FunctionSpecificArea, IOCTL_CALL_FAIL, IOCTL_MJ_NVMD_GET, IOCTL_MN_NVMD_GET_CONFIG, tiIOCTLPayload_wwn::Length, tiIOCTLPayload_wwn::MajorFunction, tiIOCTLPayload_wwn::MinorFunction, tiIOCTLPayload_wwn::Reserved, status, TD_MAX_NUM_PHYS, tiRoot::tdData, tdsaRoot_s::tdsaAllShared, tdsaNVMDGetIoctl(), TI_DBG3, tiCOMDelayedInterruptHandler(), tiIS_SPC, and tiNonInterruptContext.
Referenced by agtiapi_getdevlist(), and tiCOMMgntIOCTL().
osGLOBAL bit32 tiINIGetExpander | ( | tiRoot_t * | tiRoot, |
tiPortalContext_t * | tiPortalContext, | ||
tiDeviceHandle_t * | tiDev, | ||
tiDeviceHandle_t ** | tiExp | ||
) |
Definition at line 971 of file itddisc.c.
References agFALSE, agNULL, agTRUE, tdsaDeviceData_s::ExpDevice, tdList_s::flink, tdsaPortContext_s::id, TD_PORT_LOCK, tiDeviceHandle::tdData, tiRoot::tdData, TDLIST_EMPTY, TDLIST_OBJECT_BASE, tdsaDeviceData_s::tdPortContext, tdsaRoot_s::tdsaAllShared, tdsaSingleThreadedEnter(), tdsaSingleThreadedLeave(), TI_DBG1, TI_DBG3, tdsaDeviceData_s::tiDeviceHandle, tiError, tdsaPortContext_s::tiPortalContext, tiSuccess, and tdsaPortContext_s::valid.
Referenced by agtiapi_PrepareSMPSGListCB().
osGLOBAL tiDeviceHandle_t * tiINIGetExpDeviceHandleBySasAddress | ( | tiRoot_t * | tiRoot, |
tiPortalContext_t * | tiPortalContext, | ||
bit32 | sas_addr_hi, | ||
bit32 | sas_addr_lo, | ||
bit32 | maxDevs | ||
) |
Definition at line 1110 of file itddisc.c.
References tdsaDeviceData_s::agDevHandle, agFALSE, agNULL, agTRUE, DEVICE_IS_SMP_TARGET, tdList_s::flink, tdsaPortContext_s::id, tdsaDeviceData_s::registered, SAS_EDGE_EXPANDER_DEVICE, SAS_FANOUT_EXPANDER_DEVICE, TDSASAddressID_s::sasAddressHi, tdsaDeviceData_s::SASAddressID, TDSASAddressID_s::sasAddressLo, tdsaDeviceData_s::SASSpecDeviceType, TD_PORT_LOCK, tiRoot::tdData, TDLIST_EMPTY, TDLIST_OBJECT_BASE, tdsaDeviceData_s::tdPortContext, tdsaRoot_s::tdsaAllShared, tdsaSingleThreadedEnter(), tdsaSingleThreadedLeave(), TI_DBG1, TI_DBG2, TI_DBG3, TI_DBG6, tdsaDeviceData_s::tiDeviceHandle, tdsaPortContext_s::tiPortalContext, tdsaDeviceData_s::valid, and tdsaPortContext_s::valid.
Referenced by ostiGetDevHandleFromSasAddr().
osGLOBAL bit32 tiINILogin | ( | tiRoot_t * | tiRoot, |
tiDeviceHandle_t * | tiDeviceHandle | ||
) |
Definition at line 925 of file itddisc.c.
References TI_DBG6, and tiNotSupported.
osGLOBAL bit32 tiINILogout | ( | tiRoot_t * | tiRoot, |
tiDeviceHandle_t * | tiDeviceHandle | ||
) |
Definition at line 955 of file itddisc.c.
References TI_DBG6, and tiNotSupported.