FreeBSD kernel pms device code
|
Go to the source code of this file.
int agtiapi_alloc_ostimem | ( | struct agtiapi_softc * | pmcsc | ) |
Definition at line 1720 of file agtiapi.c.
References agNULL, AGTIAPI_DYNAMIC_MAX, AGTIAPI_FAIL, agtiapi_MemoryCB(), AGTIAPI_PRINTK, AGTIAPI_SUCCESS, _ag_card_info::dynamicMem, _ag_card_info::freeDynamicMem, _ag_dma_addr::nocache_busaddr, _ag_dma_addr::nocache_mem, NULL, agtiapi_softc::osti_busaddr, agtiapi_softc::osti_dmat, agtiapi_softc::osti_mapp, agtiapi_softc::osti_mem, agtiapi_softc::pCardInfo, and _ag_card_info::topOfFreeDynamicMem.
Referenced by agtiapi_attach().
int agtiapi_alloc_requests | ( | struct agtiapi_softc * | pmcsc | ) |
Definition at line 1620 of file agtiapi.c.
References agNULL, AGTIAPI_CCB_PER_DEVICE, AGTIAPI_MAX_DMA_SEGS, AGTIAPI_NSEGS, AGTIAPI_PRINTK, agtiapi_SglMemoryCB(), agtiapi_TITimer(), agtiapi_softc::buffer_dmat, agtiapi_softc::devRmTimer, agtiapi_softc::devRmTimerLock, agtiapi_softc::IO_timer, agtiapi_softc::IO_timer_lock, maxTargets, NULL, agtiapi_softc::OS_timer, agtiapi_softc::OS_timer_lock, agtiapi_softc::pCardInfo, _ag_card_info::pmIOLock, _ag_resource_info::tiLoLevelResource, _ag_card_info::tiRscInfo, agtiapi_softc::tisgl_busaddr, agtiapi_softc::tisgl_dmat, agtiapi_softc::tisgl_map, agtiapi_softc::tisgl_mem, and USEC_PER_TICK.
Referenced by agtiapi_attach().
void agtiapi_CheckAllVectors | ( | struct agtiapi_softc * | pCard, |
bit32 | context | ||
) |
Definition at line 4781 of file agtiapi.c.
References agtiapi_intx_mode, agTRUE, _ag_card_info::maxInterruptVectors, pCard, agtiapi_softc::pCardInfo, tiCOMDelayedInterruptHandler(), tiCOMInterruptHandler(), and agtiapi_softc::tiRoot.
Referenced by agtiapi_CheckCB(), and agtiapi_TITimer().
agBOOLEAN agtiapi_CheckCB | ( | struct agtiapi_softc * | pCard, |
U32 | milisec, | ||
U32 | flag, | ||
volatile U32 * | pStatus | ||
) |
Definition at line 4819 of file agtiapi.c.
References AGTIAPI_CB_DONE, agtiapi_CheckAllVectors(), agtiapi_DelayMSec(), AGTIAPI_FAIL, AGTIAPI_FLOW, AGTIAPI_PRINTK, AGTIAPI_SUCCESS, agtiapi_softc::flags, pCard, agtiapi_softc::pCardInfo, TASK_MANAGEMENT, TASK_TIMEOUT, tiCOMTimerTick(), _ag_resource_info::tiInitiatorResource, tiNonInterruptContext, agtiapi_softc::tiRoot, and _ag_card_info::tiRscInfo.
Referenced by agtiapi_DiscoverTgt(), and agtiapi_ResetCard().
STATIC U32 agtiapi_CheckError | ( | struct agtiapi_softc * | pmcsc, |
ccb_t * | pccb | ||
) |
Definition at line 3936 of file agtiapi.c.
References agFALSE, agtiapi_FreeCCB(), agtiapi_HandleEncryptedIOFailure(), AGTIAPI_IO, AGTIAPI_PRINTK, agTRUE, _CCB::ccb, _ag_device::CCBCount, _CCB::ccbStatus, agtiapi_softc::freezeSim, INDEX, maxTargets, NULL, agtiapi_softc::pDevList, agtiapi_softc::pWWNList, SCSI_CHECK_CONDITION, SCSI_TASK_ABORTED, _CCB::scsiStatus, agtiapi_softc::sim, _CCB::targetId, tiBusy, tiDetailAborted, tiDetailAbortLogin, tiDetailAbortReset, tiDetailDekIVMismatch, tiDetailDekKeyCacheMiss, tiDetailDifAppTagMismatch, tiDetailDifCrcMismatch, tiDetailDifRefTagMismatch, tiDetailNoLogin, tiDetailNotValid, tiDetailOtherError, tiDeviceBusy, tiIODifError, tiIOEncryptError, tiIOFailed, tiIOOverRun, tiIOSuccess, and tiIOUnderRun.
Referenced by agtiapi_Done().
STATIC U32 agtiapi_CheckSMPError | ( | struct agtiapi_softc * | pmcsc, |
ccb_t * | pccb | ||
) |
Definition at line 4165 of file agtiapi.c.
References agtiapi_FreeSMPCCB(), AGTIAPI_PRINTK, _CCB::ccb, _CCB::ccbStatus, _CCB::targetId, tiSMPFailed, and tiSMPSuccess.
Referenced by agtiapi_SMPDone().
STATIC void agtiapi_clrRmScan | ( | struct agtiapi_softc * | pCard | ) |
Definition at line 5905 of file agtiapi.c.
References AG_LIST_LOCK, AG_LIST_UNLOCK, AGTIAPI_PRINTK, agtiapi_scan(), agtiapi_softc::devDiscover, agtiapi_softc::devListLock, _ag_device::flags, NULL, pCard, _ag_device::pDevHandle, agtiapi_softc::pDevList, _ag_portal_data::portalInfo, _ag_tgt_map::portId, agtiapi_softc::pPortalData, agtiapi_softc::pWWNList, and agtiapi_softc::rmChkCt.
Referenced by agtiapi_devRmCheck(), and agtiapi_GetDevHandle().
STATIC agBOOLEAN agtiapi_DeQueueCCB | ( | struct agtiapi_softc * | pCard, |
pccb_t * | phead, | ||
pccb_t * | ptail, | ||
ccb_t * | pccb | ||
) |
Definition at line 5695 of file agtiapi.c.
References AGTIAPI_FAIL, AGTIAPI_PRINTK, AGTIAPI_SUCCESS, NULL, _CCB::pccbNext, and status.
STATIC void agtiapi_devRmCheck | ( | void * | data | ) |
Definition at line 5957 of file agtiapi.c.
References AG_LIST_LOCK, AG_LIST_UNLOCK, agtiapi_clrRmScan(), agtiapi_devRmCheck(), AGTIAPI_PRINTK, AGTIAPI_SHUT_DOWN, agtiapi_softc::devDiscover, agtiapi_softc::devListLock, agtiapi_softc::devRmTimer, FALSE, agtiapi_softc::flags, pCard, agtiapi_softc::pWWNList, agtiapi_softc::rmChkCt, and TRUE.
Referenced by agtiapi_devRmCheck(), and agtiapi_GetDevHandle().
STATIC void agtiapi_DiscoverTgt | ( | struct agtiapi_softc * | pCard | ) |
Definition at line 4882 of file agtiapi.c.
References agtiapi_CheckCB(), agtiapi_DelayMSec(), AGTIAPI_DISC_COMPLETE, AGTIAPI_DISC_DONE, AGTIAPI_EXTRA_DELAY, AGTIAPI_FAIL, AGTIAPI_FLOW, AGTIAPI_GET_DEV_MAX, agtiapi_GetDevHandle(), AGTIAPI_INIT, AGTIAPI_INIT_DELAY, AGTIAPI_INIT_TIME, AGTIAPI_PORT_DISC_READY, AGTIAPI_PORT_LINK_UP, AGTIAPI_PRINTK, agtiapi_softc::flags, FORCE_PERSISTENT_ASSIGN_MASK, pCard, PORTAL_STATUS, _ag_portal_data::portalInfo, agtiapi_softc::portCount, agtiapi_softc::pPortalData, agtiapi_softc::tgtCount, tiINIDiscoverTargets(), _ag_portal_info::tiPortalContext, agtiapi_softc::tiRoot, and tiSuccess.
Referenced by agtiapi_InitCardHW().
STATIC void agtiapi_Done | ( | struct agtiapi_softc * | pmcsc, |
ccb_t * | pccb | ||
) |
Definition at line 3801 of file agtiapi.c.
References agtiapi_CheckError(), agtiapi_FreeCCB(), AGTIAPI_IO, AGTIAPI_PRINTK, _CCB::ccb, tiIniScsiCmnd::cdb, CMND_DMA_UNMAP, _CCB::pccbNext, tiSuperScsiInitiatorRequest::scsiCmnd, _CCB::targetId, and _CCB::tiSuperScsiRequest.
Referenced by agtiapi_StartIO(), and ostiInitiatorIOCompleted().
int agtiapi_DoSoftReset | ( | struct agtiapi_softc * | pmcsc | ) |
Definition at line 2189 of file agtiapi.c.
References agtiapi_ResetCard(), AGTIAPI_SOFT_RESET, AGTIAPI_SUCCESS, flags, agtiapi_softc::flags, SUCCESS, and tiError.
Referenced by agtiapi_CheckIOTimeout(), agtiapi_eh_HostReset(), and agtiapi_StartTM().
Definition at line 4265 of file agtiapi.c.
References _CCB::addrMode, tiSuperScsiInitiatorRequest::agSgl1, AGTIAPI_PRINTK, _CCB::ccbStatus, tiIniScsiCmnd::cdb, _CCB::dataLen, _CCB::devHandle, tiIniScsiCmnd::expDataLength, _CCB::flags, tiSgl_s::len, tiSgl_s::lower, _CCB::lun, _CCB::numSgElements, tiSuperScsiInitiatorRequest::scsiCmnd, _CCB::scsiStatus, _CCB::senseLen, _CCB::targetId, tiIniScsiCmnd::taskAttribute, _CCB::tiSuperScsiRequest, tiSgl_s::type, and tiSgl_s::upper.
Referenced by agtiapi_StartIO().
Definition at line 2130 of file agtiapi.c.
References AGTIAPI_IO, _CCB::ccb, _CCB::flags, MIN, and NULL.
Referenced by agtiapi_FreeCCB().
int agtiapi_eh_HostReset | ( | struct agtiapi_softc * | pmcsc, |
union ccb * | cmnd | ||
) |
Definition at line 4322 of file agtiapi.c.
References agNULL, agtiapi_DoSoftReset(), AGTIAPI_PRINTK, IOCTL_EVT_SEV_INFORMATIONAL, NULL, and tiInvalidHandle.
Referenced by agtiapi_cam_action().
STATIC int agtiapi_FindWWNListNext | ( | ag_tgt_map_t * | pWWNList, |
int | lstMax | ||
) |
Definition at line 5257 of file agtiapi.c.
References AGTIAPI_PRINTK.
Referenced by agtiapi_GetDevHandle().
STATIC void agtiapi_FlushCCBs | ( | struct agtiapi_softc * | pCard, |
U32 | flag | ||
) |
Definition at line 4623 of file agtiapi.c.
References AGTIAPI_CALLBACK, agtiapi_FreeCCB(), agtiapi_FreeSMPCCB(), agtiapi_FreeTMCCB(), AGTIAPI_PRINTK, _CCB::ccb, agtiapi_softc::ccbChainList, CMND_DMA_UNMAP, DEV_RESET, _CCB::flags, NULL, pCard, _CCB::pccbChainNext, TAG_SMP, and TASK_MANAGEMENT.
Referenced by agtiapi_ResetCard().
STATIC void agtiapi_FreeCCB | ( | struct agtiapi_softc * | pmcsc, |
pccb_t | pccb | ||
) |
Definition at line 4500 of file agtiapi.c.
References agtiapi_softc::activeCCB, agNULL, AGSCSI_INIT_XCHG_LEN, agtiapi_CleanupEncryptedIO(), agtiapi_DumpCDB(), AGTIAPI_IO, AGTIAPI_PRINTK, agtiapi_softc::buffer_dmat, _CCB::ccb, _CCB::CCB_dmamap, agtiapi_softc::ccbFreeList, _CCB::ccbStatus, _CCB::dataLen, tiSuperScsiInitiatorRequest::Dif, tiDif_s::DIFPerLAAddrHi, tiDif_s::DIFPerLAAddrLo, _CCB::dmaHandle, tiDif_s::enableDIFPerLA, tiEncrypt::enableEncryptionPerLA, agtiapi_softc::encrypt, tiSuperScsiInitiatorRequest::Encrypt, tiEncrypt::EncryptionPerLAAddrHi, tiEncrypt::EncryptionPerLAAddrLo, FALSE, _CCB::flags, NULL, _CCB::numSgElements, agtiapi_softc::pCardInfo, _CCB::pccbIO, _CCB::pccbNext, _ag_card_info::pPCIDev, _CCB::retryCount, _CCB::scsiStatus, _CCB::sgList, _CCB::startTime, tiIORequest::tdData, _CCB::tiIORequest, _CCB::tiSuperScsiRequest, and TRUE.
Referenced by agtiapi_CheckError(), agtiapi_Done(), agtiapi_FlushCCBs(), agtiapi_PrepareSGListCB(), agtiapi_PrepareSMPSGListCB(), agtiapi_QueueCmnd_(), and agtiapi_QueueSMP().
STATIC void agtiapi_FreeSMPCCB | ( | struct agtiapi_softc * | pmcsc, |
pccb_t | pccb | ||
) |
Definition at line 4678 of file agtiapi.c.
References agtiapi_softc::activeCCB, AGSMP_INIT_XCHG_LEN, AGTIAPI_PRINTK, agtiapi_softc::buffer_dmat, _CCB::ccb, _CCB::CCB_dmamap, agtiapi_softc::ccbFreeList, _CCB::ccbStatus, _CCB::dataLen, _CCB::dmaHandle, _CCB::flags, NULL, _CCB::numSgElements, _CCB::pccbNext, _CCB::retryCount, _CCB::startTime, tiIORequest::tdData, _CCB::tiIORequest, and _CCB::tiSMPFrame.
Referenced by agtiapi_CheckSMPError(), agtiapi_FlushCCBs(), and agtiapi_SMPDone().
STATIC void agtiapi_FreeTMCCB | ( | struct agtiapi_softc * | pmcsc, |
pccb_t | pccb | ||
) |
Definition at line 4750 of file agtiapi.c.
References agtiapi_softc::activeCCB, AGSCSI_INIT_XCHG_LEN, AGTIAPI_PRINTK, _CCB::ccb, agtiapi_softc::ccbFreeList, _CCB::ccbStatus, _CCB::dataLen, _CCB::dmaHandle, _CCB::flags, NULL, _CCB::numSgElements, _CCB::pccbIO, _CCB::pccbNext, _CCB::retryCount, _CCB::scsiStatus, _CCB::startTime, tiIORequest::tdData, _CCB::tiIORequest, and _CCB::tiSuperScsiRequest.
Referenced by agtiapi_FlushCCBs(), agtiapi_StartTM(), and ostiInitiatorEvent().
STATIC pccb_t agtiapi_GetCCB | ( | struct agtiapi_softc * | pmcsc | ) |
Definition at line 1998 of file agtiapi.c.
References ACTIVE, agtiapi_softc::activeCCB, AGTIAPI_IO, AGTIAPI_PRINTK, agtiapi_softc::ccbFreeList, _CCB::flags, NULL, _CCB::pccbNext, and _CCB::startTime.
Referenced by agtiapi_QueueCmnd_(), agtiapi_QueueSMP(), agtiapi_StartTM(), ostiInitiatorEvent(), and ostiNumOfLUNIOCTLreq().
STATIC U32 agtiapi_GetDevHandle | ( | struct agtiapi_softc * | pmcsc, |
ag_portal_info_t * | pPortalInfo, | ||
U32 | eType, | ||
U32 | eStatus | ||
) |
Definition at line 5296 of file agtiapi.c.
References ACTIVE, AG_LIST_LOCK, AG_LIST_UNLOCK, agFALSE, agtiapi_clrRmScan(), agtiapi_devRmCheck(), agtiapi_FindWWNListNext(), AGTIAPI_FLOW, AGTIAPI_INIT_DELAY, AGTIAPI_INIT_TIME, agtiapi_InitCCBs(), AGTIAPI_PRINTK, _ag_device::CCBCount, agtiapi_softc::devDiscover, _ag_device::devInfo, _ag_tgt_map::devListIndex, agtiapi_softc::devListLock, _ag_portal_info::devPrev, agtiapi_softc::devRmTimer, _ag_portal_info::devTotal, _ag_device::devType, DIRECT_DEVICE, DPMC_LEANFLAG_AGDEVUSED, DPMC_LEANFLAG_NOAGDEVYT, DPMC_LEANFLAG_NOWWNLIST, DPMC_LEANFLAG_PDEVSUSED, FALSE, _ag_device::flags, _ag_tgt_map::flags, agtiapi_softc::flags, _ag_slr_map::localeNameLen, tiPortInfo::localName, tiPortInfo::localNameLen, NULL, tiDeviceHandle::osData, pCard, _ag_device::pCard, _ag_device::pDevHandle, agtiapi_softc::pDevList, _ag_device::portalId, _ag_portal_info::portID, _ag_tgt_map::portId, _ag_device::pPortalInfo, agtiapi_softc::pSLRList, agtiapi_softc::pWWNList, _ag_device::qbusy, tiPortInfo::remoteName, _ag_slr_map::remoteNameLen, tiPortInfo::remoteNameLen, agtiapi_softc::rmChkCt, _ag_tgt_map::sasLrIdx, SOFT_MAPPED, _ag_device::targetId, _ag_device::targetLen, _ag_tgt_map::targetLen, _ag_device::targetName, agtiapi_softc::tgtCount, tiCOMGetPortInfo(), tiINIGetDeviceHandles(), tiINIGetDeviceInfo(), _ag_portal_info::tiPortalContext, agtiapi_softc::tiRoot, tiSuccess, TRUE, wwncpy(), and wwnprintk().
Referenced by agtiapi_DiscoverTgt(), and ostiInitiatorEvent().
void agtiapi_hexdump | ( | const char * | ptitle, |
bit8 * | pbuf, | ||
int | len | ||
) |
Definition at line 3894 of file agtiapi.c.
References AGTIAPI_PRINTK.
Referenced by ostiInitiatorIOCompleted(), and ostiInitiatorSMPCompleted().
STATIC agBOOLEAN agtiapi_InitCardHW | ( | struct agtiapi_softc * | pmsc | ) |
Definition at line 1216 of file agtiapi.c.
References ag_Perbi, agtiapi_DelayMSec(), AGTIAPI_DISC_COMPLETE, AGTIAPI_DISC_DONE, agtiapi_DiscoverTgt(), AGTIAPI_EXTRA_DELAY, AGTIAPI_FAIL, AGTIAPI_INIT_TIME, AGTIAPI_INSTALLED, AGTIAPI_LOOP_MAX, AGTIAPI_PORT_DISC_READY, AGTIAPI_PORT_START, AGTIAPI_PRINTK, AGTIAPI_SYS_INTR_ON, AGTIAPI_TIMER_ON, agtiapi_TITimer(), agTRUE, agtiapi_softc::devDiscover, flags, agtiapi_softc::flags, NULL, pCard, agtiapi_softc::pDevList, _ag_portal_data::portalInfo, agtiapi_softc::portCount, _ag_portal_info::portID, _ag_portal_info::portStatus, agtiapi_softc::pPortalData, agtiapi_softc::pSLRList, agtiapi_softc::pWWNList, agtiapi_softc::tgtCount, tiCOMGetPortInfo(), tiCOMPortStart(), tiCOMSystemInterruptsActive(), _ag_portal_info::tiPortalContext, _ag_portal_info::tiPortInfo, agtiapi_softc::tiRoot, and tiSuccess.
Referenced by agtiapi_attach().
STATIC agBOOLEAN agtiapi_InitCardSW | ( | struct agtiapi_softc * | pmsc | ) |
Definition at line 1120 of file agtiapi.c.
References agFALSE, AGTIAPI_FAIL, AGTIAPI_PORT_INITIALIZED, AGTIAPI_PRINTK, AGTIAPI_SUCCESS, AGTIAPI_SYS_INTR_ON, agTRUE, atomic_set, agtiapi_softc::devListLock, agtiapi_softc::encrypt, tiLoLevelOption::encryption, tiLoLevelOption::flag, agtiapi_softc::flags, agtiapi_softc::freezeSim, tiLoLevelResource::loLevelOption, tiLoLevelOption::max_MSI_InterruptVectors, _ag_card_info::maxInterruptVectors, tiLoLevelOption::maxNumOSLocks, agtiapi_softc::my_dev, NULL, tiLoLevelOption::numOfQueuesPerPort, outstanding_encrypted_io_count, agtiapi_softc::pCardInfo, PCI_DEVICE_ID_HIALEAH_HBA_SPCVE, _ag_card_info::pPCIDev, tiCOMInit(), tiCOMPortInit(), _ag_resource_info::tiInitiatorResource, _ag_resource_info::tiLoLevelResource, agtiapi_softc::tiRoot, _ag_card_info::tiRscInfo, _ag_resource_info::tiSharedMem, and tiSuccess.
Referenced by agtiapi_attach().
STATIC U32 agtiapi_InitCCBs | ( | struct agtiapi_softc * | pCard, |
int | tgtCount, | ||
int | tid | ||
) |
Definition at line 5143 of file agtiapi.c.
References AGSA_MAX_INBOUND_Q, AGTIAPI_CCB_PER_DEVICE, AGTIAPI_CCB_SIZE, AGTIAPI_FLOW, agtiapi_PrepCCBs(), AGTIAPI_PRINTK, cache_line_size, hdr, NULL, pCard, and agtiapi_softc::tgtCount.
Referenced by agtiapi_GetDevHandle().
void agtiapi_IntrHandler0 | ( | void * | arg | ) |
Definition at line 1401 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler1 | ( | void * | arg | ) |
Definition at line 1412 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler10 | ( | void * | arg | ) |
Definition at line 1511 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler11 | ( | void * | arg | ) |
Definition at line 1522 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler12 | ( | void * | arg | ) |
Definition at line 1533 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler13 | ( | void * | arg | ) |
Definition at line 1544 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler14 | ( | void * | arg | ) |
Definition at line 1555 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler15 | ( | void * | arg | ) |
Definition at line 1566 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler2 | ( | void * | arg | ) |
Definition at line 1423 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler3 | ( | void * | arg | ) |
Definition at line 1434 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler4 | ( | void * | arg | ) |
Definition at line 1445 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler5 | ( | void * | arg | ) |
Definition at line 1456 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler6 | ( | void * | arg | ) |
Definition at line 1467 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler7 | ( | void * | arg | ) |
Definition at line 1478 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler8 | ( | void * | arg | ) |
Definition at line 1489 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandler9 | ( | void * | arg | ) |
Definition at line 1500 of file agtiapi.c.
References agtiapi_IntrHandlerx_().
Referenced by agtiapi_attach().
void agtiapi_IntrHandlerx_ | ( | void * | arg, |
int | index | ||
) |
Definition at line 1353 of file agtiapi.c.
References AG_GET_DONE_PCCB, AG_GET_DONE_SMP_PCCB, agFALSE, AGTIAPI_SHUT_DOWN, agtiapi_softc::flags, index, pCard, agtiapi_softc::pCardInfo, _ag_card_info::pmIOLock, tiCOMDelayedInterruptHandler(), tiCOMInterruptHandler(), tiInterruptContext, and agtiapi_softc::tiRoot.
Referenced by agtiapi_IntrHandler0(), agtiapi_IntrHandler1(), agtiapi_IntrHandler10(), agtiapi_IntrHandler11(), agtiapi_IntrHandler12(), agtiapi_IntrHandler13(), agtiapi_IntrHandler14(), agtiapi_IntrHandler15(), agtiapi_IntrHandler2(), agtiapi_IntrHandler3(), agtiapi_IntrHandler4(), agtiapi_IntrHandler5(), agtiapi_IntrHandler6(), agtiapi_IntrHandler7(), agtiapi_IntrHandler8(), and agtiapi_IntrHandler9().
|
static |
|
static |
|
static |
|
static |
|
static |
STATIC void agtiapi_PrepCCBs | ( | struct agtiapi_softc * | pCard, |
ccb_hdr_t * | hdr, | ||
U32 | size, | ||
U32 | max_ccb, | ||
int | tid | ||
) |
Definition at line 5012 of file agtiapi.c.
References AGTIAPI_CCB_PER_DEVICE, AGTIAPI_CCB_SIZE, AGTIAPI_NSEGS, AGTIAPI_PRINTK, agtiapi_softc::buffer_dmat, cache_line_size, _CCB::ccb, _CCB::CCB_dmamap, agtiapi_softc::ccbAllocList, agtiapi_softc::ccbChainList, agtiapi_softc::ccbFreeList, _CCB::ccbStatus, agtiapi_softc::ccbTotal, _CCB::cmd, _CCB::dataLen, _CCB::devHandle, _CCB::flags, hdr, _CCB::lun, NULL, _CCB::numSgElements, tiIORequest::osData, pCard, _CCB::pccbChainNext, _CCB::pccbIO, _CCB::pccbNext, _CCB::pSenseData, _CCB::retryCount, _CCB::scsiStatus, _CCB::senseLen, _CCB::sgList, _CCB::startTime, _CCB::targetId, _CCB::tdIOReqBody, _CCB::tiIORequest, _CCB::tisgl_busaddr, agtiapi_softc::tisgl_busaddr, agtiapi_softc::tisgl_mem, tiSuccess, and _CCB::tiSuperScsiRequest.
Referenced by agtiapi_InitCCBs().
STATIC void agtiapi_QueueCCB | ( | struct agtiapi_softc * | pmcsc, |
pccb_t * | phead, | ||
pccb_t * | ptail, | ||
ccb_t * | pccb | ||
) |
Definition at line 4360 of file agtiapi.c.
References AGTIAPI_IO, NULL, and _CCB::pccbNext.
Referenced by agtiapi_PrepareSGListCB(), agtiapi_PrepareSMPSGListCB(), agtiapi_Retry(), agtiapi_StartIO(), agtiapi_StartSMP(), ostiInitiatorIOCompleted(), and ostiInitiatorSMPCompleted().
int agtiapi_QueueCmnd_ | ( | struct agtiapi_softc * | pmcsc, |
union ccb * | ccb | ||
) |
Definition at line 2038 of file agtiapi.c.
References _CCB::addrMode, agNULL, agtiapi_AddrModes, agtiapi_adjust_queue_depth(), agtiapi_FreeCCB(), agtiapi_GetCCB(), AGTIAPI_IO, agtiapi_PrepareSGList(), AGTIAPI_PRINTK, _CCB::ccb, _CCB::channel, CMND_TO_CHANNEL, CMND_TO_LUN, CMND_TO_TARGET, tiSuperScsiInitiatorRequest::flags, INDEX, _CCB::lun, maxTargets, NULL, agtiapi_softc::pDevList, _CCB::pmcsc, _CCB::pSenseData, _ag_device::qdepth, _CCB::senseLen, _CCB::startTime, status, _CCB::targetId, tiBusy, tiError, tiReject, tiSuccess, and _CCB::tiSuperScsiRequest.
Referenced by agtiapi_cam_action().
|
static |
STATIC void agtiapi_ReleaseCCBs | ( | struct agtiapi_softc * | pCard | ) |
Definition at line 5803 of file agtiapi.c.
References AGTIAPI_PRINTK, agtiapi_softc::buffer_dmat, cache_line_size, _CCB::CCB_dmamap, agtiapi_softc::ccbAllocList, agtiapi_softc::ccbChainList, hdr, NULL, pCard, and _CCB::pccbChainNext.
Referenced by agtiapi_ReleaseHBA().
int agtiapi_ReleaseHBA | ( | device_t | dev | ) |
Definition at line 6319 of file agtiapi.c.
References ag_card_good, agCardInfoList, agNULL, agtiapi_1st_time, agtiapi_async(), AGTIAPI_INSTALLED, agtiapi_intx_mode, AGTIAPI_IRQ_REQUESTED, agtiapi_MemFree(), AGTIAPI_PORT_INITIALIZED, AGTIAPI_PRINTK, agtiapi_ReleaseCCBs(), agtiapi_ReleasePCIMem(), AGTIAPI_SCSI_REGISTERED, AGTIAPI_SHUT_DOWN, AGTIAPI_SYS_INTR_ON, AGTIAPI_TIMER_ON, atomic_read, agtiapi_softc::buffer_dmat, agtiapi_softc::ccbTotal, agtiapi_softc::devListLock, agtiapi_softc::devq, agtiapi_softc::devRmTimer, agtiapi_softc::devRmTimerLock, agtiapi_softc::encrypt, FALSE, flags, agtiapi_softc::flags, agtiapi_softc::intrcookie, agtiapi_softc::IO_timer, agtiapi_softc::irq, tiLoLevelResource::loLevelOption, MAX_MSIX_NUM_DPC, MAX_MSIX_NUM_VECTOR, agtiapi_softc::my_cdev, NULL, tiLoLevelOption::numOfQueuesPerPort, agtiapi_softc::OS_timer, agtiapi_softc::OS_timer_lock, agtiapi_softc::osti_busaddr, agtiapi_softc::osti_dmat, agtiapi_softc::osti_mapp, agtiapi_softc::osti_mem, outstanding_encrypted_io_count, agtiapi_softc::path, pCard, agtiapi_softc::pCardInfo, agtiapi_softc::pDevList, _ag_card_info::pmIOLock, agtiapi_softc::pPortalData, agtiapi_softc::pSLRList, agtiapi_softc::pWWNList, agtiapi_softc::rscID, agtiapi_softc::sim, tiCOMShutDown(), tiCOMSystemInterruptsActive(), _ag_resource_info::tiLoLevelResource, agtiapi_softc::tiRoot, _ag_card_info::tiRscInfo, agtiapi_softc::tisgl_busaddr, agtiapi_softc::tisgl_dmat, agtiapi_softc::tisgl_map, and agtiapi_softc::tisgl_mem.
U32 agtiapi_ResetCard | ( | struct agtiapi_softc * | pCard, |
unsigned long * | flags | ||
) |
Definition at line 6063 of file agtiapi.c.
References agBOOLEAN, agFALSE, agNULL, AGTIAPI_CALLBACK, AGTIAPI_CB_DONE, agtiapi_CheckCB(), AGTIAPI_DISC_COMPLETE, AGTIAPI_DISC_DONE, AGTIAPI_FAIL, agtiapi_FlushCCBs(), AGTIAPI_HAD_RESET, AGTIAPI_INSTALLED, AGTIAPI_LOOP_MAX, AGTIAPI_PORT_DISC_READY, AGTIAPI_PORT_START, AGTIAPI_PRINTK, AGTIAPI_RESET, AGTIAPI_RESET_SUCCESS, AGTIAPI_SOFT_RESET, agtiapi_StartIO(), AGTIAPI_SUCCESS, AGTIAPI_SYS_INTR_ON, agtiapi_softc::ccbDoneHead, agtiapi_softc::ccbDoneTail, agtiapi_softc::ccbSendHead, agtiapi_softc::ccbSendTail, agtiapi_softc::devDiscover, _ag_portal_info::devPrev, _ag_portal_info::devTotal, FALSE, flags, _ag_device::flags, agtiapi_softc::flags, IOCTL_EVT_SEV_INFORMATIONAL, maxTargets, NULL, pCard, _ag_device::pDevHandle, agtiapi_softc::pDevList, _ag_portal_data::portalInfo, agtiapi_softc::portCount, _ag_portal_info::portID, _ag_portal_info::portStatus, agtiapi_softc::pPortalData, agtiapi_softc::resetCount, agtiapi_softc::smpDoneHead, agtiapi_softc::smpDoneTail, agtiapi_softc::smpSendHead, agtiapi_softc::smpSendTail, agtiapi_softc::tgtCount, tiCOMGetPortInfo(), tiCOMPortInit(), tiCOMPortStart(), tiCOMReset(), tiCOMSystemInterruptsActive(), _ag_portal_info::tiPortalContext, _ag_portal_info::tiPortInfo, agtiapi_softc::tiRoot, tiSoftReset, tiSuccess, and TRUE.
Referenced by agtiapi_CharIoctl(), and agtiapi_DoSoftReset().
STATIC void agtiapi_Retry | ( | struct agtiapi_softc * | pmcsc, |
ccb_t * | pccb | ||
) |
Definition at line 4237 of file agtiapi.c.
References ACTIVE, AGTIAPI_PRINTK, agtiapi_QueueCCB(), AGTIAPI_RETRY, agtiapi_softc::ccbSendHead, agtiapi_softc::ccbSendTail, _CCB::ccbStatus, _CCB::flags, _CCB::retryCount, _CCB::scsiStatus, and _CCB::startTime.
|
static |
void agtiapi_SetLunField | ( | ccb_t * | pccb | ) |
Definition at line 4458 of file agtiapi.c.
References _CCB::addrMode, AGTIAPI_ADDRMODE_SHIFT, AGTIAPI_LUN_ADDR, AGTIAPI_PERIPHERAL, AGTIAPI_VOLUME_SET, _CCB::lun, tiIniScsiCmnd::lun, tiSuperScsiInitiatorRequest::scsiCmnd, _CCB::targetId, and _CCB::tiSuperScsiRequest.
Referenced by agtiapi_PrepareSGListCB().
|
static |
STATIC void agtiapi_SMPDone | ( | struct agtiapi_softc * | pmcsc, |
ccb_t * | pccb | ||
) |
Definition at line 3851 of file agtiapi.c.
References agtiapi_CheckSMPError(), agtiapi_FreeSMPCCB(), AGTIAPI_PRINTK, _CCB::ccb, CMND_DMA_UNMAP, and _CCB::pccbNext.
Referenced by agtiapi_StartSMP().
STATIC void agtiapi_StartIO | ( | struct agtiapi_softc * | pmcsc | ) |
Definition at line 3085 of file agtiapi.c.
References ACTIVE, AG_GET_DONE_PCCB, AG_IO_DUMPCCB, agNULL, agtiapi_Done(), agtiapi_DumpCCB(), AGTIAPI_IO, AGTIAPI_PRINTK, agtiapi_QueueCCB(), AGTIAPI_RESET, _CCB::ccb, agtiapi_softc::ccbSendHead, agtiapi_softc::ccbSendTail, _CCB::ccbStatus, _CCB::devHandle, flags, agtiapi_softc::flags, INDEX, IOCTL_EVT_SEV_ERROR, IOCTL_EVT_SEV_INFORMATIONAL, maxTargets, NULL, tiDeviceHandle::osData, _CCB::pccbNext, agtiapi_softc::pDevList, _CCB::retryCount, _CCB::scsiStatus, status, _CCB::targetId, _CCB::tdIOReqBody, tiBusy, tiDetailNoLogin, tiDetailOtherError, tiDeviceBusy, tiError, tiINISuperIOStart(), tiInterruptContext, tiIOFailed, tiIONoDevice, _CCB::tiIORequest, agtiapi_softc::tiRoot, tiSuccess, and _CCB::tiSuperScsiRequest.
Referenced by agtiapi_PrepareSGListCB(), and agtiapi_ResetCard().
STATIC void agtiapi_StartSMP | ( | struct agtiapi_softc * | pmcsc | ) |
Definition at line 3298 of file agtiapi.c.
References AG_GET_DONE_SMP_PCCB, AGTIAPI_PRINTK, agtiapi_QueueCCB(), AGTIAPI_RESET, agtiapi_SMPDone(), _CCB::ccb, _CCB::ccbStatus, _CCB::devHandle, _CCB::flags, agtiapi_softc::flags, NULL, _CCB::pccbNext, _CCB::retryCount, agtiapi_softc::smpSendHead, agtiapi_softc::smpSendTail, status, TAG_SMP, _CCB::tdIOReqBody, tiBusy, tiError, tiINISMPStart(), tiInterruptContext, _CCB::tiIORequest, agtiapi_softc::tiRoot, tiSMPFailed, _CCB::tiSMPFrame, and tiSuccess.
Referenced by agtiapi_PrepareSMPSGListCB().
int agtiapi_StartTM | ( | struct agtiapi_softc * | pCard, |
ccb_t * | pccb | ||
) |
Definition at line 2307 of file agtiapi.c.
References ACTIVE, AG_ABORT_TASK, agtiapi_DoSoftReset(), AGTIAPI_FAIL, agtiapi_FreeTMCCB(), agtiapi_GetCCB(), AGTIAPI_PRINTK, AGTIAPI_SUCCESS, agtiapi_softc::devDiscover, _CCB::devHandle, _CCB::flags, _ag_device::flags, INDEX, tiIniScsiCmnd::lun, maxTargets, NULL, pCard, _CCB::pccbIO, agtiapi_softc::pDevList, _CCB::pmcsc, tiSuperScsiInitiatorRequest::scsiCmnd, _CCB::startTime, status, _CCB::targetId, TASK_MANAGEMENT, TASK_SUCCESS, tiIORequest::tdData, tiINIIOAbort(), tiINITaskManagement(), tiIONoDevice, _CCB::tiIORequest, agtiapi_softc::tiRoot, tiSuccess, and _CCB::tiSuperScsiRequest.
Referenced by agtiapi_CheckIOTimeout().
STATIC void agtiapi_TITimer | ( | void * | data | ) |
Definition at line 5865 of file agtiapi.c.
References agtiapi_CheckAllVectors(), agtiapi_polling_mode, AGTIAPI_SHUT_DOWN, agtiapi_TITimer(), flags, agtiapi_softc::flags, agtiapi_softc::OS_timer, pCard, agtiapi_softc::pCardInfo, tiCOMTimerTick(), _ag_resource_info::tiLoLevelResource, tiNonInterruptContext, agtiapi_softc::tiRoot, _ag_card_info::tiRscInfo, and USEC_PER_TICK.
Referenced by agtiapi_alloc_requests(), agtiapi_InitCardHW(), and agtiapi_TITimer().
STATIC int wwncpy | ( | ag_device_t * | pDevice | ) |
Definition at line 5766 of file agtiapi.c.
References AGTIAPI_PRINTK, _ag_device::devInfo, tiDeviceInfo::osAddress1, tiDeviceInfo::osAddress2, tiDeviceInfo::remoteAddress, tiDeviceInfo::remoteName, _ag_device::targetLen, and _ag_device::targetName.
Referenced by agtiapi_GetDevHandle().
STATIC void wwnprintk | ( | unsigned char * | name, |
int | len | ||
) |
Definition at line 5752 of file agtiapi.c.
References AGTIAPI_PRINTK.
Referenced by agtiapi_GetDevHandle().