FreeBSD kernel pms device code
agtiapi.c File Reference
#include <sys/cdefs.h>
#include <dev/pms/config.h>
#include <sys/param.h>
#include <sys/ioccom.h>
#include <sys/module.h>
#include <sys/systm.h>
#include <sys/errno.h>
#include <sys/kernel.h>
#include <sys/conf.h>
#include <sys/uio.h>
#include <sys/types.h>
#include <sys/malloc.h>
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/rman.h>
#include <machine/resource.h>
#include <vm/vm.h>
#include <vm/pmap.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
#include <sys/endian.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/sema.h>
#include <sys/queue.h>
#include <sys/taskqueue.h>
#include <machine/atomic.h>
#include <sys/libkern.h>
#include <cam/cam.h>
#include <cam/cam_ccb.h>
#include <cam/cam_debug.h>
#include <cam/cam_periph.h>
#include <cam/cam_sim.h>
#include <cam/cam_xpt_sim.h>
#include <cam/scsi/scsi_all.h>
#include <cam/scsi/scsi_message.h>
#include <dev/pms/RefTisa/tisa/api/tiapi.h>
#include <dev/pms/freebsd/driver/ini/src/agtiapi.h>
#include <dev/pms/freebsd/driver/ini/src/agtiproto.h>
#include <dev/pms/RefTisa/tisa/api/ostiapi.h>
#include <dev/pms/RefTisa/tisa/sassata/common/tdsatypes.h>
#include <dev/pms/freebsd/driver/common/lxencrypt.h>
#include <dev/pms/freebsd/driver/common/lxosapi.c>
#include <dev/pms/freebsd/driver/ini/src/osapi.c>
#include <dev/pms/freebsd/driver/common/lxutil.c>
#include <dev/pms/freebsd/driver/common/lxencrypt.c>
Include dependency graph for agtiapi.c:

Go to the source code of this file.

Macros

#define MAJOR_REVISION   1
 
#define MINOR_REVISION   3
 
#define BUILD_REVISION   10800
 
#define cache_line_size()   CACHE_LINE_SIZE
 
#define PMCoffsetof(TYPE, MEMBER)   ((size_t) &((TYPE *)0)->MEMBER)
 
#define CPU_TO_LE32(dst, src)
 
#define CMND_TO_CHANNEL(ccb)   ( ccb->ccb_h.path_id )
 
#define CMND_TO_TARGET( ccb)   ( ccb->ccb_h.target_id )
 
#define CMND_TO_LUN( ccb)   ( ccb->ccb_h.target_lun )
 
#define AGTIAPI_WWN(name, len)
 
#define AGTIAPI_WWNPRINTK(name, len, format, a...)
 
#define AGTIAPI_ERR_WWNPRINTK(name, len, format, a...)
 
#define AGTIAPI_CPY_DEV_INFO(root, dev, pDev)
 
#define AG_GET_DONE_PCCB(pccb, pmcsc)
 
#define AG_GET_DONE_SMP_PCCB(pccb, pmcsc)
 
#define AG_IO_DUMPCCB(pccb)
 
#define SCHED_DELAY_JIFFIES   4 /* in seconds */
 
#define AG_HOTPLUG_LOCK_INIT(lock)
 
#define AG_LIST_LOCK(lock)
 
#define AG_LIST_UNLOCK(lock)
 

Functions

 __FBSDID ("$FreeBSD$")
 
 MALLOC_DEFINE (M_PMC_MCCB, "CCB List", "CCB List for PMCS driver")
 
 MALLOC_DEFINE (M_PMC_MSTL, "STLock malloc", "allocated in agtiapi_attach as memory for lock use")
 
 MALLOC_DEFINE (M_PMC_MDVT, "ag_device_t malloc", "allocated in agtiapi_attach as mem for ag_device_t pDevList")
 
 MALLOC_DEFINE (M_PMC_MPRT, "ag_portal_data_t malloc", "allocated in agtiapi_attach as mem for *pPortalData")
 
 MALLOC_DEFINE (M_PMC_MDEV, "tiDeviceHandle_t * malloc", "allocated in agtiapi_GetDevHandle as local mem for **agDev")
 
 MALLOC_DEFINE (M_PMC_MFLG, "lDevFlags * malloc", "allocated in agtiapi_GetDevHandle as local mem for * flags")
 
 MALLOC_DEFINE (TEMP,"tempbuff","buffer for payload")
 
 MALLOC_DEFINE (TEMP2, "tempbuff", "buffer for agtiapi_getdevlist")
 
STATIC void agtiapi_CheckIOTimeout (void *data)
 
static void agtiapi_cam_action (struct cam_sim *, union ccb *)
 
static void agtiapi_cam_poll (struct cam_sim *)
 
static void agtiapi_async (void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
 
void agtiapi_adjust_queue_depth (struct cam_path *path, bit32 QueueDepth)
 
int agtiapi_open (struct cdev *dev, int oflags, int devtype, struct thread *td)
 
int agtiapi_close (struct cdev *dev, int fflag, int devtype, struct thread *td)
 
int agtiapi_read (struct cdev *dev, struct uio *uio, int ioflag)
 
int agtiapi_write (struct cdev *dev, struct uio *uio, int ioflag)
 
int agtiapi_getdevlist (struct agtiapi_softc *pCard, tiIOCTLPayload_t *agIOCTLPayload)
 
int agtiapi_getCardInfo (struct agtiapi_softc *pCard, U32_64 size, void *buffer)
 
static int agtiapi_CharIoctl (struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
 
static int agtiapi_probe (device_t dev)
 
static int agtiapi_attach (device_t devx)
 
STATIC agBOOLEAN agtiapi_InitCardSW (struct agtiapi_softc *pmsc)
 
STATIC agBOOLEAN agtiapi_InitCardHW (struct agtiapi_softc *pmsc)
 
void agtiapi_IntrHandlerx_ (void *arg, int index)
 
void agtiapi_IntrHandler0 (void *arg)
 
void agtiapi_IntrHandler1 (void *arg)
 
void agtiapi_IntrHandler2 (void *arg)
 
void agtiapi_IntrHandler3 (void *arg)
 
void agtiapi_IntrHandler4 (void *arg)
 
void agtiapi_IntrHandler5 (void *arg)
 
void agtiapi_IntrHandler6 (void *arg)
 
void agtiapi_IntrHandler7 (void *arg)
 
void agtiapi_IntrHandler8 (void *arg)
 
void agtiapi_IntrHandler9 (void *arg)
 
void agtiapi_IntrHandler10 (void *arg)
 
void agtiapi_IntrHandler11 (void *arg)
 
void agtiapi_IntrHandler12 (void *arg)
 
void agtiapi_IntrHandler13 (void *arg)
 
void agtiapi_IntrHandler14 (void *arg)
 
void agtiapi_IntrHandler15 (void *arg)
 
static void agtiapi_SglMemoryCB (void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
 
static void agtiapi_MemoryCB (void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
 
int agtiapi_alloc_requests (struct agtiapi_softc *pmcsc)
 
int agtiapi_alloc_ostimem (struct agtiapi_softc *pmcsc)
 
STATIC pccb_t agtiapi_GetCCB (struct agtiapi_softc *pmcsc)
 
int agtiapi_QueueCmnd_ (struct agtiapi_softc *pmcsc, union ccb *ccb)
 
STATIC void agtiapi_DumpCDB (const char *ptitle, ccb_t *pccb)
 
int agtiapi_DoSoftReset (struct agtiapi_softc *pmcsc)
 
int agtiapi_StartTM (struct agtiapi_softc *pCard, ccb_t *pccb)
 
static int agtiapi_PrepareSGList (struct agtiapi_softc *pmcsc, ccb_t *pccb)
 
static void agtiapi_PrepareSGListCB (void *arg, bus_dma_segment_t *segs, int nsegs, int error)
 
STATIC void agtiapi_StartIO (struct agtiapi_softc *pmcsc)
 
STATIC void agtiapi_StartSMP (struct agtiapi_softc *pmcsc)
 
static int agtiapi_PrepareSMPSGList (struct agtiapi_softc *pmcsc, ccb_t *pccb)
 
static void agtiapi_PrepareSMPSGListCB (void *arg, bus_dma_segment_t *segs, int nsegs, int error)
 
STATIC void agtiapi_Done (struct agtiapi_softc *pmcsc, ccb_t *pccb)
 
STATIC void agtiapi_SMPDone (struct agtiapi_softc *pmcsc, ccb_t *pccb)
 
void agtiapi_hexdump (const char *ptitle, bit8 *pbuf, int len)
 
STATIC U32 agtiapi_CheckError (struct agtiapi_softc *pmcsc, ccb_t *pccb)
 
STATIC U32 agtiapi_CheckSMPError (struct agtiapi_softc *pmcsc, ccb_t *pccb)
 
void agtiapi_HandleEncryptedIOFailure (ag_device_t *pDev, ccb_t *pccb)
 
STATIC void agtiapi_Retry (struct agtiapi_softc *pmcsc, ccb_t *pccb)
 
STATIC void agtiapi_DumpCCB (ccb_t *pccb)
 
int agtiapi_eh_HostReset (struct agtiapi_softc *pmcsc, union ccb *cmnd)
 
STATIC void agtiapi_QueueCCB (struct agtiapi_softc *pmcsc, pccb_t *phead, pccb_t *ptail, ccb_t *pccb)
 
static int agtiapi_QueueSMP (struct agtiapi_softc *pmcsc, union ccb *ccb)
 
void agtiapi_SetLunField (ccb_t *pccb)
 
STATIC void agtiapi_FreeCCB (struct agtiapi_softc *pmcsc, pccb_t pccb)
 
STATIC void agtiapi_FlushCCBs (struct agtiapi_softc *pCard, U32 flag)
 
STATIC void agtiapi_FreeSMPCCB (struct agtiapi_softc *pmcsc, pccb_t pccb)
 
STATIC void agtiapi_FreeTMCCB (struct agtiapi_softc *pmcsc, pccb_t pccb)
 
void agtiapi_CheckAllVectors (struct agtiapi_softc *pCard, bit32 context)
 
agBOOLEAN agtiapi_CheckCB (struct agtiapi_softc *pCard, U32 milisec, U32 flag, volatile U32 *pStatus)
 
STATIC void agtiapi_DiscoverTgt (struct agtiapi_softc *pCard)
 
STATIC void agtiapi_PrepCCBs (struct agtiapi_softc *pCard, ccb_hdr_t *hdr, U32 size, U32 max_ccb, int tid)
 
STATIC U32 agtiapi_InitCCBs (struct agtiapi_softc *pCard, int tgtCount, int tid)
 
STATIC int agtiapi_FindWWNListNext (ag_tgt_map_t *pWWNList, int lstMax)
 
STATIC U32 agtiapi_GetDevHandle (struct agtiapi_softc *pCard, ag_portal_info_t *pPortalInfo, U32 eType, U32 eStatus)
 
static void agtiapi_scan (struct agtiapi_softc *pmcsc)
 
STATIC agBOOLEAN agtiapi_DeQueueCCB (struct agtiapi_softc *pCard, pccb_t *phead, pccb_t *ptail, ccb_t *pccb)
 
STATIC void wwnprintk (unsigned char *name, int len)
 
STATIC int wwncpy (ag_device_t *pDevice)
 
STATIC void agtiapi_ReleaseCCBs (struct agtiapi_softc *pCard)
 
STATIC void agtiapi_TITimer (void *data)
 
STATIC void agtiapi_clrRmScan (struct agtiapi_softc *pCard)
 
STATIC void agtiapi_devRmCheck (void *data)
 
U32 agtiapi_ResetCard (struct agtiapi_softc *pCard, unsigned long *flags)
 
int agtiapi_ReleaseHBA (device_t dev)
 
static int agtiapi_shutdown (device_t dev)
 
static int agtiapi_suspend (device_t dev)
 
static int agtiapi_resume (device_t dev)
 
 DRIVER_MODULE (pmspcv, pci, pmspcv_driver, pmspcv_devclass, 0, 0)
 
 MODULE_DEPEND (pmspcv, cam, 1, 1, 1)
 
 MODULE_DEPEND (pmspcv, pci, 1, 1, 1)
 

Variables

STATIC U32 agtiapi_intx_mode = 0
 
STATIC U08 ag_Perbi = 0
 
STATIC U32 agtiapi_polling_mode = 0
 
STATIC U32 ag_card_good = 0
 
STATIC U32 ag_option_flag = 0
 
STATIC U32 agtiapi_1st_time = 1
 
STATIC U32 ag_timeout_secs = 10
 
U32 gTiDebugLevel = 1
 
S32 ag_encryption_enable = 0
 
atomic_t outstanding_encrypted_io_count
 
STATIC U08 agtiapi_AddrModes [AGTIAPI_MAX_CHANNEL_NUM+1]
 
static ag_card_info_t agCardInfoList [AGTIAPI_MAX_CARDS]
 
static d_open_t agtiapi_open
 
static d_close_t agtiapi_close
 
static d_read_t agtiapi_read
 
static d_write_t agtiapi_write
 
static d_ioctl_t agtiapi_CharIoctl
 
static struct cdevsw agtiapi_cdevsw
 
U32 maxTargets = 0
 
U32 ag_portal_count = 0
 
static device_method_t agtiapi_methods []
 
static devclass_t pmspcv_devclass
 
static driver_t pmspcv_driver
 

Macro Definition Documentation

◆ AG_GET_DONE_PCCB

#define AG_GET_DONE_PCCB (   pccb,
  pmcsc 
)
Value:
{ \
AG_LOCAL_LOCK(&pmcsc->doneLock); \
pccb = pmcsc->ccbDoneHead; \
if (pccb != NULL) \
{ \
pmcsc->ccbDoneHead = NULL; \
pmcsc->ccbDoneTail = NULL; \
AG_LOCAL_UNLOCK(&pmcsc->doneLock); \
agtiapi_Done(pmcsc, pccb); \
} \
else \
AG_LOCAL_UNLOCK(&pmcsc->doneLock); \
}
#define NULL
Definition: ostypes.h:142

Definition at line 164 of file agtiapi.c.

◆ AG_GET_DONE_SMP_PCCB

#define AG_GET_DONE_SMP_PCCB (   pccb,
  pmcsc 
)
Value:
{ \
AG_LOCAL_LOCK(&pmcsc->doneSMPLock); \
pccb = pmcsc->smpDoneHead; \
if (pccb != NULL) \
{ \
pmcsc->smpDoneHead = NULL; \
pmcsc->smpDoneTail = NULL; \
AG_LOCAL_UNLOCK(&pmcsc->doneSMPLock); \
agtiapi_SMPDone(pmcsc, pccb); \
} \
else \
AG_LOCAL_UNLOCK(&pmcsc->doneSMPLock); \
}

Definition at line 179 of file agtiapi.c.

◆ AG_HOTPLUG_LOCK_INIT

#define AG_HOTPLUG_LOCK_INIT (   lock)

Definition at line 207 of file agtiapi.c.

◆ AG_IO_DUMPCCB

#define AG_IO_DUMPCCB (   pccb)

Definition at line 197 of file agtiapi.c.

◆ AG_LIST_LOCK

#define AG_LIST_LOCK (   lock)

Definition at line 208 of file agtiapi.c.

◆ AG_LIST_UNLOCK

#define AG_LIST_UNLOCK (   lock)

Definition at line 209 of file agtiapi.c.

◆ AGTIAPI_CPY_DEV_INFO

#define AGTIAPI_CPY_DEV_INFO (   root,
  dev,
  pDev 
)
Value:
tiINIGetDeviceInfo(root, dev, &pDev->devInfo); \
wwncpy(pDev);
osGLOBAL bit32 tiINIGetDeviceInfo(tiRoot_t *tiRoot, tiDeviceHandle_t *tiDeviceHandle, tiDeviceInfo_t *tiDeviceInfo)
Definition: itddisc.c:780

Definition at line 140 of file agtiapi.c.

◆ AGTIAPI_ERR_WWNPRINTK

#define AGTIAPI_ERR_WWNPRINTK (   name,
  len,
  format,
  a... 
)
Value:
printk(KERN_DEBUG format "name ", ## a); \
wwnprintk((unsigned char*)name, len);

Definition at line 137 of file agtiapi.c.

◆ AGTIAPI_WWN

#define AGTIAPI_WWN (   name,
  len 
)

Definition at line 129 of file agtiapi.c.

◆ AGTIAPI_WWNPRINTK

#define AGTIAPI_WWNPRINTK (   name,
  len,
  format,
  a... 
)
Value:
AGTIAPI_PRINTK(format "name ", a); \
AGTIAPI_WWN((unsigned char*)name, len);
#define AGTIAPI_PRINTK(format, a...)
Definition: lxcommon.h:517

Definition at line 133 of file agtiapi.c.

◆ BUILD_REVISION

#define BUILD_REVISION   10800

Definition at line 28 of file agtiapi.c.

◆ cache_line_size

#define cache_line_size ( )    CACHE_LINE_SIZE

Definition at line 105 of file agtiapi.c.

◆ CMND_TO_CHANNEL

#define CMND_TO_CHANNEL (   ccb)    ( ccb->ccb_h.path_id )

Definition at line 113 of file agtiapi.c.

◆ CMND_TO_LUN

#define CMND_TO_LUN (   ccb)    ( ccb->ccb_h.target_lun )

Definition at line 115 of file agtiapi.c.

◆ CMND_TO_TARGET

#define CMND_TO_TARGET (   ccb)    ( ccb->ccb_h.target_id )

Definition at line 114 of file agtiapi.c.

◆ CPU_TO_LE32

#define CPU_TO_LE32 (   dst,
  src 
)
Value:
dst.lower = htole32(LOW_32_BITS(src)); \
dst.upper = htole32(HIGH_32_BITS(src))
#define LOW_32_BITS(addr)
Definition: lxcommon.h:571
#define HIGH_32_BITS(addr)
Definition: lxcommon.h:572

Definition at line 109 of file agtiapi.c.

◆ MAJOR_REVISION

#define MAJOR_REVISION   1

Definition at line 26 of file agtiapi.c.

◆ MINOR_REVISION

#define MINOR_REVISION   3

Definition at line 27 of file agtiapi.c.

◆ PMCoffsetof

#define PMCoffsetof (   TYPE,
  MEMBER 
)    ((size_t) &((TYPE *)0)->MEMBER)

Definition at line 107 of file agtiapi.c.

◆ SCHED_DELAY_JIFFIES

#define SCHED_DELAY_JIFFIES   4 /* in seconds */

Definition at line 200 of file agtiapi.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ agtiapi_adjust_queue_depth()

void agtiapi_adjust_queue_depth ( struct cam_path *  path,
bit32  QueueDepth 
)

Definition at line 470 of file agtiapi.c.

Referenced by agtiapi_async(), and agtiapi_QueueCmnd_().

Here is the caller graph for this function:

◆ agtiapi_alloc_ostimem()

◆ agtiapi_alloc_requests()

◆ agtiapi_async()

static void agtiapi_async ( void *  callback_arg,
u_int32_t  code,
struct cam_path *  path,
void *  arg 
)
static

Definition at line 485 of file agtiapi.c.

References agtiapi_adjust_queue_depth(), INDEX, maxTargets, NULL, agtiapi_softc::pDevList, and _ag_device::qdepth.

Referenced by agtiapi_attach(), and agtiapi_ReleaseHBA().

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

◆ agtiapi_attach()

static int agtiapi_attach ( device_t  devx)
static

Definition at line 724 of file agtiapi.c.

References ag_encryption_enable, ag_portal_count, ag_timeout_secs, agCardInfoList, agFALSE, agNULL, agtiapi_alloc_ostimem(), agtiapi_alloc_requests(), agtiapi_async(), agtiapi_cam_action(), agtiapi_cam_poll(), agtiapi_cdevsw, AGTIAPI_FAIL, AGTIAPI_HW_LIMIT_DEVICE, AGTIAPI_INIT_TIME, agtiapi_InitCardHW(), agtiapi_InitCardSW(), AGTIAPI_INITIATOR, agtiapi_InitResource(), AGTIAPI_INSTALLED, 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(), agtiapi_IntrHandler9(), AGTIAPI_IRQ_REQUESTED, AGTIAPI_MAX_CAM_Q_DEPTH, AGTIAPI_MAX_DEVICE, AGTIAPI_MAX_DEVICE_7H, AGTIAPI_MAX_DEVICE_8H, AGTIAPI_MAX_PORTALS, AGTIAPI_PRINTK, agtiapi_ScopeDMARes(), AGTIAPI_SCSI_REGISTERED, agtiapi_SetupEncryption(), AGTIAPI_SUCCESS, AGTIAPI_UNKNOWN, agTRUE, agtiapi_softc::cardNo, agtiapi_softc::ccbAllocList, agtiapi_softc::ccbChainList, agtiapi_softc::ccbFreeList, agtiapi_softc::ccbTotal, agtiapi_softc::dev_scan, agtiapi_softc::devDiscover, agtiapi_softc::devq_flag, agtiapi_softc::encrypt, tiLoLevelOption::encryption, agtiapi_softc::flags, gTiDebugLevel, agtiapi_softc::intrcookie, agtiapi_softc::irq, Is_ADP7H, Is_ADP8H, tiLoLevelResource::loLevelOption, lun, MAX_MSIX_NUM_ISR, MAX_MSIX_NUM_VECTOR, _ag_card_info::maxInterruptVectors, maxTargets, MIN, agtiapi_softc::my_cdev, agtiapi_softc::my_dev, NULL, tiPortalContext::osData, tiRoot::osData, osti_memset, osti_strncmp, osti_strtoul, ostiGetTransportParam(), agtiapi_softc::path, _ag_card_info::pCard, _ag_portal_data::pCard, agtiapi_softc::pCardInfo, PCI_DEVICE_ID_HIALEAH_HBA_SPCVE, _ag_card_info::pmIOLock, _ag_portal_data::portalInfo, agtiapi_softc::portCount, _ag_portal_info::portID, _ag_card_info::pPCIDev, agtiapi_softc::pPortalData, agtiapi_softc::rscID, agtiapi_softc::sim, agtiapi_softc::SimQFrozen, tiCOMGetResource(), _ag_resource_info::tiInitiatorResource, _ag_resource_info::tiLoLevelResource, _ag_portal_info::tiPortalContext, agtiapi_softc::tiRoot, _ag_card_info::tiRscInfo, _ag_resource_info::tiSharedMem, tiSuccess, TRUE, agtiapi_softc::typhn, and agtiapi_softc::VidDid.

Here is the call graph for this function:

◆ agtiapi_cam_action()

◆ agtiapi_cam_poll()

static void agtiapi_cam_poll ( struct cam_sim *  asim)
static

Definition at line 6044 of file agtiapi.c.

Referenced by agtiapi_attach().

Here is the caller graph for this function:

◆ agtiapi_CharIoctl()

◆ agtiapi_CheckAllVectors()

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().

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

◆ agtiapi_CheckCB()

agBOOLEAN agtiapi_CheckCB ( struct agtiapi_softc pCard,
U32  milisec,
U32  flag,
volatile U32 pStatus 
)

◆ agtiapi_CheckError()

◆ agtiapi_CheckIOTimeout()

◆ agtiapi_CheckSMPError()

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().

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

◆ agtiapi_close()

int agtiapi_close ( struct cdev *  dev,
int  fflag,
int  devtype,
struct thread *  td 
)

Definition at line 258 of file agtiapi.c.

References AGTIAPI_PRINTK, and agtiapi_softc::my_dev.

◆ agtiapi_clrRmScan()

◆ agtiapi_DeQueueCCB()

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.

◆ agtiapi_devRmCheck()

STATIC void agtiapi_devRmCheck ( void *  data)

◆ agtiapi_DiscoverTgt()

◆ agtiapi_Done()

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().

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

◆ agtiapi_DoSoftReset()

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().

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

◆ agtiapi_DumpCCB()

◆ agtiapi_DumpCDB()

STATIC void agtiapi_DumpCDB ( const char *  ptitle,
ccb_t pccb 
)

Definition at line 2130 of file agtiapi.c.

References AGTIAPI_IO, _CCB::ccb, _CCB::flags, MIN, and NULL.

Referenced by agtiapi_FreeCCB().

Here is the caller graph for this function:

◆ agtiapi_eh_HostReset()

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().

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

◆ agtiapi_FindWWNListNext()

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().

Here is the caller graph for this function:

◆ agtiapi_FlushCCBs()

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().

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

◆ agtiapi_FreeCCB()

◆ agtiapi_FreeSMPCCB()

◆ agtiapi_FreeTMCCB()

◆ agtiapi_getCardInfo()

int agtiapi_getCardInfo ( struct agtiapi_softc pCard,
U32_64  size,
void *  buffer 
)

Definition at line 449 of file agtiapi.c.

References agtiapi_softc::my_dev, pCard, agtiapi_softc::pCardInfo, _ag_card_info::pciIOAddrLow, _ag_card_info::pciIOAddrUp, and _ag_card_info::pciMemBase.

Referenced by agtiapi_CharIoctl().

Here is the caller graph for this function:

◆ agtiapi_GetCCB()

STATIC pccb_t agtiapi_GetCCB ( struct agtiapi_softc pmcsc)

◆ agtiapi_GetDevHandle()

STATIC U32 agtiapi_GetDevHandle ( struct agtiapi_softc pCard,
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().

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

◆ agtiapi_getdevlist()

◆ agtiapi_HandleEncryptedIOFailure()

void agtiapi_HandleEncryptedIOFailure ( ag_device_t pDev,
ccb_t pccb 
)

Definition at line 4218 of file agtiapi.c.

References AGTIAPI_PRINTK.

Referenced by agtiapi_CheckError().

Here is the caller graph for this function:

◆ agtiapi_hexdump()

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().

Here is the caller graph for this function:

◆ agtiapi_InitCardHW()

◆ agtiapi_InitCardSW()

◆ agtiapi_InitCCBs()

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().

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

◆ agtiapi_IntrHandler0()

void agtiapi_IntrHandler0 ( void *  arg)

Definition at line 1401 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler1()

void agtiapi_IntrHandler1 ( void *  arg)

Definition at line 1412 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler10()

void agtiapi_IntrHandler10 ( void *  arg)

Definition at line 1511 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler11()

void agtiapi_IntrHandler11 ( void *  arg)

Definition at line 1522 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler12()

void agtiapi_IntrHandler12 ( void *  arg)

Definition at line 1533 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler13()

void agtiapi_IntrHandler13 ( void *  arg)

Definition at line 1544 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler14()

void agtiapi_IntrHandler14 ( void *  arg)

Definition at line 1555 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler15()

void agtiapi_IntrHandler15 ( void *  arg)

Definition at line 1566 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler2()

void agtiapi_IntrHandler2 ( void *  arg)

Definition at line 1423 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler3()

void agtiapi_IntrHandler3 ( void *  arg)

Definition at line 1434 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler4()

void agtiapi_IntrHandler4 ( void *  arg)

Definition at line 1445 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler5()

void agtiapi_IntrHandler5 ( void *  arg)

Definition at line 1456 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler6()

void agtiapi_IntrHandler6 ( void *  arg)

Definition at line 1467 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler7()

void agtiapi_IntrHandler7 ( void *  arg)

Definition at line 1478 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler8()

void agtiapi_IntrHandler8 ( void *  arg)

Definition at line 1489 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandler9()

void agtiapi_IntrHandler9 ( void *  arg)

Definition at line 1500 of file agtiapi.c.

References agtiapi_IntrHandlerx_().

Referenced by agtiapi_attach().

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

◆ agtiapi_IntrHandlerx_()

◆ agtiapi_MemoryCB()

static void agtiapi_MemoryCB ( void *  arg,
bus_dma_segment_t *  dm_segs,
int  nseg,
int  error 
)
static

Definition at line 1590 of file agtiapi.c.

References AGTIAPI_PRINTK.

Referenced by agtiapi_alloc_ostimem(), and agtiapi_typhAlloc().

Here is the caller graph for this function:

◆ agtiapi_open()

int agtiapi_open ( struct cdev *  dev,
int  oflags,
int  devtype,
struct thread *  td 
)

Definition at line 248 of file agtiapi.c.

References AGTIAPI_PRINTK, and agtiapi_softc::my_dev.

◆ agtiapi_PrepareSGList()

static int agtiapi_PrepareSGList ( struct agtiapi_softc pmcsc,
ccb_t pccb 
)
static

Definition at line 2520 of file agtiapi.c.

References AGTIAPI_IO, agtiapi_PrepareSGListCB(), AGTIAPI_PRINTK, agTRUE, agtiapi_softc::buffer_dmat, _CCB::ccb, _CCB::CCB_dmamap, NULL, agtiapi_softc::sim, agtiapi_softc::SimQFrozen, tiReject, and tiSuccess.

Referenced by agtiapi_QueueCmnd_().

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

◆ agtiapi_PrepareSGListCB()

static void agtiapi_PrepareSGListCB ( void *  arg,
bus_dma_segment_t *  segs,
int  nsegs,
int  error 
)
static

Definition at line 2600 of file agtiapi.c.

References tiSuperScsiInitiatorRequest::agSgl1, agtiapi_FreeCCB(), AGTIAPI_INQUIRY, AGTIAPI_IO, AGTIAPI_MAX_DMA_SEGS, AGTIAPI_PRINTK, agtiapi_QueueCCB(), agtiapi_SetLunField(), agtiapi_SetupEncryptedIO(), agtiapi_StartIO(), agtiapi_softc::buffer_dmat, _CCB::ccb, _CCB::CCB_dmamap, agtiapi_softc::ccbSendHead, agtiapi_softc::ccbSendTail, _CCB::ccbStatus, tiIniScsiCmnd::cdb, CMND_TO_TARGET, CPU_TO_LE32, tiSuperScsiInitiatorRequest::dataDirection, _CCB::dataLen, agtiapi_softc::devDiscover, _CCB::devHandle, tiSuperScsiInitiatorRequest::Dif, DIF_BLOCK_SIZE_4096, DIF_BLOCK_SIZE_4160, DIF_BLOCK_SIZE_520, DIF_CRC_VERIFICATION, DIF_INSERT, DIF_UDT_REF_BLOCK_COUNT, DIF_VERIFY_DELETE, DIF_VERIFY_FORWARD, EDC_DATA, EDC_DATA_CRC, tiDif_s::enableDIFPerLA, agtiapi_softc::encrypt, tiIniScsiCmnd::expDataLength, _CCB::flags, _ag_device::flags, agtiapi_softc::flags, tiDif_s::flags, tiSuperScsiInitiatorRequest::flags, INDEX, tiSgl_s::len, maxTargets, NULL, _CCB::numSgElements, pCard, _ag_device::pDevHandle, agtiapi_softc::pDevList, _CCB::pmcsc, tiSuperScsiInitiatorRequest::scsiCmnd, _CCB::scsiStatus, _ag_device::sector_size, _CCB::senseLen, _CCB::sgList, tiSuperScsiInitiatorRequest::sglVirtualAddr, _CCB::targetId, TASK_ACA, TASK_HEAD_OF_QUEUE, TASK_ORDERED, TASK_SIMPLE, tiIniScsiCmnd::taskAttribute, TI_SCSI_INITIATOR_DIF, tiDetailNoLogin, tiDirectionIn, tiDirectionOut, tiIOFailed, tiSgl, _CCB::tisgl_busaddr, tiSglList, tiSuccess, _CCB::tiSuperScsiRequest, TRUE, tiSgl_s::type, and tiDif_s::udtArray.

Referenced by agtiapi_PrepareSGList().

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

◆ agtiapi_PrepareSMPSGList()

static int agtiapi_PrepareSMPSGList ( struct agtiapi_softc pmcsc,
ccb_t pccb 
)
static

◆ agtiapi_PrepareSMPSGListCB()

◆ agtiapi_PrepCCBs()

◆ agtiapi_probe()

static int agtiapi_probe ( device_t  dev)
static

Definition at line 691 of file agtiapi.c.

References agCardInfoList, AGTIAPI_MAX_CARDS, and agtiapi_ProbeCard().

Here is the call graph for this function:

◆ agtiapi_QueueCCB()

STATIC void agtiapi_QueueCCB ( struct agtiapi_softc pmcsc,
pccb_t phead,
pccb_t ptail,
ccb_t pccb 
)

◆ agtiapi_QueueCmnd_()

◆ agtiapi_QueueSMP()

static int agtiapi_QueueSMP ( struct agtiapi_softc pmcsc,
union ccb *  ccb 
)
static

Definition at line 4405 of file agtiapi.c.

References agNULL, agtiapi_FreeCCB(), agtiapi_GetCCB(), agtiapi_PrepareSMPSGList(), AGTIAPI_PRINTK, _CCB::ccb, NULL, _CCB::pmcsc, status, _CCB::targetId, tiBusy, tiError, tiReject, and tiSuccess.

Referenced by agtiapi_cam_action().

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

◆ agtiapi_read()

int agtiapi_read ( struct cdev *  dev,
struct uio *  uio,
int  ioflag 
)

Definition at line 268 of file agtiapi.c.

References AGTIAPI_PRINTK, and agtiapi_softc::my_dev.

◆ agtiapi_ReleaseCCBs()

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().

Here is the caller graph for this function:

◆ 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.

Here is the call graph for this function:

◆ agtiapi_ResetCard()

U32 agtiapi_ResetCard ( struct agtiapi_softc pCard,
unsigned long *  flags 
)

◆ agtiapi_resume()

static int agtiapi_resume ( device_t  dev)
static

Definition at line 6608 of file agtiapi.c.

References AGTIAPI_PRINTK.

◆ agtiapi_Retry()

STATIC void agtiapi_Retry ( struct agtiapi_softc pmcsc,
ccb_t pccb 
)

◆ agtiapi_scan()

static void agtiapi_scan ( struct agtiapi_softc pmcsc)
static

Definition at line 5647 of file agtiapi.c.

References agNULL, AGTIAPI_PRINTK, agTRUE, agtiapi_softc::cardNo, agtiapi_softc::dev_scan, lun, agtiapi_softc::pCardInfo, _ag_card_info::pmIOLock, and agtiapi_softc::sim.

Referenced by agtiapi_clrRmScan().

Here is the caller graph for this function:

◆ agtiapi_SetLunField()

void agtiapi_SetLunField ( ccb_t pccb)

◆ agtiapi_SglMemoryCB()

static void agtiapi_SglMemoryCB ( void *  arg,
bus_dma_segment_t *  dm_segs,
int  nseg,
int  error 
)
static

Definition at line 1572 of file agtiapi.c.

References AGTIAPI_PRINTK.

Referenced by agtiapi_alloc_requests().

Here is the caller graph for this function:

◆ agtiapi_shutdown()

static int agtiapi_shutdown ( device_t  dev)
static

Definition at line 6596 of file agtiapi.c.

References AGTIAPI_PRINTK.

◆ agtiapi_SMPDone()

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().

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

◆ agtiapi_StartIO()

◆ agtiapi_StartSMP()

◆ agtiapi_StartTM()

◆ agtiapi_suspend()

static int agtiapi_suspend ( device_t  dev)
static

Definition at line 6602 of file agtiapi.c.

References AGTIAPI_PRINTK.

◆ agtiapi_TITimer()

◆ agtiapi_write()

int agtiapi_write ( struct cdev *  dev,
struct uio *  uio,
int  ioflag 
)

Definition at line 279 of file agtiapi.c.

References AGTIAPI_PRINTK, and agtiapi_softc::my_dev.

◆ DRIVER_MODULE()

DRIVER_MODULE ( pmspcv  ,
pci  ,
pmspcv_driver  ,
pmspcv_devclass  ,
,
 
)

◆ MALLOC_DEFINE() [1/8]

MALLOC_DEFINE ( M_PMC_MCCB  ,
"CCB List"  ,
"CCB List for PMCS driver"   
)

◆ MALLOC_DEFINE() [2/8]

MALLOC_DEFINE ( M_PMC_MDEV  ,
"tiDeviceHandle_t * malloc"  ,
"allocated in agtiapi_GetDevHandle as local mem for **agDev"   
)

◆ MALLOC_DEFINE() [3/8]

MALLOC_DEFINE ( M_PMC_MDVT  ,
"ag_device_t malloc"  ,
"allocated in agtiapi_attach as mem for ag_device_t pDevList"   
)

◆ MALLOC_DEFINE() [4/8]

MALLOC_DEFINE ( M_PMC_MFLG  ,
"lDevFlags * malloc"  ,
"allocated in agtiapi_GetDevHandle as local mem for * flags  
)

◆ MALLOC_DEFINE() [5/8]

MALLOC_DEFINE ( M_PMC_MPRT  ,
"ag_portal_data_t malloc"  ,
"allocated in agtiapi_attach as mem for *pPortalData"   
)

◆ MALLOC_DEFINE() [6/8]

MALLOC_DEFINE ( M_PMC_MSTL  ,
"STLock malloc"  ,
"allocated in agtiapi_attach as memory for lock use"   
)

◆ MALLOC_DEFINE() [7/8]

MALLOC_DEFINE ( TEMP  ,
"tempbuff"  ,
"buffer for payload"   
)

◆ MALLOC_DEFINE() [8/8]

MALLOC_DEFINE ( TEMP2  ,
"tempbuff"  ,
"buffer for agtiapi_getdevlist  
)

◆ MODULE_DEPEND() [1/2]

MODULE_DEPEND ( pmspcv  ,
cam  ,
,
,
 
)

◆ MODULE_DEPEND() [2/2]

MODULE_DEPEND ( pmspcv  ,
pci  ,
,
,
 
)

◆ wwncpy()

◆ wwnprintk()

STATIC void wwnprintk ( unsigned char *  name,
int  len 
)

Definition at line 5752 of file agtiapi.c.

References AGTIAPI_PRINTK.

Referenced by agtiapi_GetDevHandle().

Here is the caller graph for this function:

Variable Documentation

◆ ag_card_good

STATIC U32 ag_card_good = 0

Definition at line 96 of file agtiapi.c.

Referenced by agtiapi_ReleaseHBA().

◆ ag_encryption_enable

S32 ag_encryption_enable = 0

Definition at line 102 of file agtiapi.c.

Referenced by agtiapi_attach().

◆ ag_option_flag

STATIC U32 ag_option_flag = 0

Definition at line 97 of file agtiapi.c.

◆ ag_Perbi

STATIC U08 ag_Perbi = 0

Definition at line 94 of file agtiapi.c.

Referenced by agtiapi_InitCardHW().

◆ ag_portal_count

U32 ag_portal_count = 0

Definition at line 242 of file agtiapi.c.

Referenced by agtiapi_attach().

◆ ag_timeout_secs

STATIC U32 ag_timeout_secs = 10

Definition at line 99 of file agtiapi.c.

Referenced by agtiapi_attach(), and agtiapi_CheckIOTimeout().

◆ agCardInfoList

ag_card_info_t agCardInfoList[AGTIAPI_MAX_CARDS]
static

Definition at line 216 of file agtiapi.c.

Referenced by agtiapi_attach(), agtiapi_probe(), agtiapi_ProbeCard(), and agtiapi_ReleaseHBA().

◆ agtiapi_1st_time

STATIC U32 agtiapi_1st_time = 1

Definition at line 98 of file agtiapi.c.

Referenced by agtiapi_ReleaseHBA().

◆ agtiapi_AddrModes

STATIC U08 agtiapi_AddrModes[AGTIAPI_MAX_CHANNEL_NUM+1]
Initial value:
=
#define AGTIAPI_PERIPHERAL
Definition: agdef.h:121

Definition at line 117 of file agtiapi.c.

Referenced by agtiapi_QueueCmnd_().

◆ agtiapi_cdevsw

struct cdevsw agtiapi_cdevsw
static
Initial value:
= {
.d_version = D_VERSION,
.d_open = agtiapi_open,
.d_close = agtiapi_close,
.d_read = agtiapi_read,
.d_write = agtiapi_write,
.d_ioctl = agtiapi_CharIoctl,
.d_name = "pmspcv",
}
static d_write_t agtiapi_write
Definition: agtiapi.c:224
static d_ioctl_t agtiapi_CharIoctl
Definition: agtiapi.c:225
static d_open_t agtiapi_open
Definition: agtiapi.c:221
static d_read_t agtiapi_read
Definition: agtiapi.c:223
static d_close_t agtiapi_close
Definition: agtiapi.c:222

Definition at line 231 of file agtiapi.c.

Referenced by agtiapi_attach().

◆ agtiapi_CharIoctl

d_ioctl_t agtiapi_CharIoctl
static

Definition at line 225 of file agtiapi.c.

◆ agtiapi_close

d_close_t agtiapi_close
static

Definition at line 222 of file agtiapi.c.

◆ agtiapi_intx_mode

STATIC U32 agtiapi_intx_mode = 0

Definition at line 93 of file agtiapi.c.

Referenced by agtiapi_CheckAllVectors(), and agtiapi_ReleaseHBA().

◆ agtiapi_methods

device_method_t agtiapi_methods[]
static
Initial value:
= {
DEVMETHOD( device_probe, agtiapi_probe ),
DEVMETHOD( device_attach, agtiapi_attach ),
DEVMETHOD( device_detach, agtiapi_ReleaseHBA ),
DEVMETHOD( device_shutdown, agtiapi_shutdown ),
DEVMETHOD( device_suspend, agtiapi_suspend ),
DEVMETHOD( device_resume, agtiapi_resume ),
{ 0, 0 }
}
static int agtiapi_attach(device_t devx)
Definition: agtiapi.c:724
static int agtiapi_shutdown(device_t dev)
Definition: agtiapi.c:6596
static int agtiapi_resume(device_t dev)
Definition: agtiapi.c:6608
static int agtiapi_probe(device_t dev)
Definition: agtiapi.c:691
static int agtiapi_suspend(device_t dev)
Definition: agtiapi.c:6602
int agtiapi_ReleaseHBA(device_t dev)
Definition: agtiapi.c:6319

Definition at line 6614 of file agtiapi.c.

◆ agtiapi_open

d_open_t agtiapi_open
static

Definition at line 221 of file agtiapi.c.

◆ agtiapi_polling_mode

STATIC U32 agtiapi_polling_mode = 0

Definition at line 95 of file agtiapi.c.

Referenced by agtiapi_TITimer().

◆ agtiapi_read

d_read_t agtiapi_read
static

Definition at line 223 of file agtiapi.c.

◆ agtiapi_write

d_write_t agtiapi_write
static

Definition at line 224 of file agtiapi.c.

◆ gTiDebugLevel

U32 gTiDebugLevel = 1

Definition at line 101 of file agtiapi.c.

Referenced by agtiapi_attach().

◆ maxTargets

◆ outstanding_encrypted_io_count

atomic_t outstanding_encrypted_io_count

Definition at line 103 of file agtiapi.c.

Referenced by agtiapi_InitCardSW(), and agtiapi_ReleaseHBA().

◆ pmspcv_devclass

devclass_t pmspcv_devclass
static

Definition at line 6624 of file agtiapi.c.

◆ pmspcv_driver

driver_t pmspcv_driver
static
Initial value:
= {
"pmspcv",
sizeof( struct agtiapi_softc )
}
static device_method_t agtiapi_methods[]
Definition: agtiapi.c:6614

Definition at line 6626 of file agtiapi.c.