24MALLOC_DEFINE( M_PMC_OSTI,
"osti_cacheable",
"allocated from ostiAllocMemory as cacheable memory" );
65 AGTIAPI_PRINTK(
"ostiAllocMemory: debug, cache? %d size %d alloc algn %d ### \n",
66 isCacheable, allocLength, alignment );
70 "AGTIAPI_DYNAMIC_MAX! ERROR\n" );
78 if( allocLength > 4096 ) {
79 AGTIAPI_PRINTK(
"ostiAllocMemory: no-cache size 0x%x alloc NOT AVAILABLE\n",
83 if( alignment > 32 ) {
84 AGTIAPI_PRINTK(
"ostiAllocMemory: no-cache alignment 0x%x NOT AVAILABLE\n",
97 mtx_lock(&
pCard->memLock);
99 *osMemHandle = (
void *)pMem;
100 mtx_unlock(&
pCard->memLock);
160 lData = pci_read_config( lDev, chipConfigOffset, 4 );
177 U32 chipConfigOffset,
178 U32 chipConfigValue )
181 pci_write_config( lDev, chipConfigOffset, chipConfigValue, 4 );
240 data = *(
U32 *)((
pCardInfo->pciMemVirtAddrSpc[busBaseNumber]) + chipOffset );
262 *(
U32 *)((
pCardInfo->pciMemVirtAddrSpc[busBaseNumber]) + chipOffset ) = aData;
305 AGTIAPI_PRINTK(
"ostiFlashReadBlock: No support for iscsi device\n" );
347 mtx_lock(&
pCard->memLock);
349 mtx_unlock(&
pCard->memLock);
390 printf(
"ostiGetTransportParam called with no key. how odd.\n" );
393 if(
agNULL == aValueName ) {
395 printf(
"ostiGetTransportParam called with no value-name. how odd.\n" );
399 strcpy( aFullKey,
"DPMC_" );
400 strcat( aFullKey, aKey );
404 for( lIdx = 1; lIdx <= 5; lIdx++ ) {
405 if( 1 == lIdx) lStrIdx = aSubkey1;
406 if( 2 == lIdx) lStrIdx = aSubkey2;
407 if( 3 == lIdx) lStrIdx = aSubkey3;
408 if( 4 == lIdx) lStrIdx = aSubkey4;
409 if( 5 == lIdx) lStrIdx = aSubkey5;
410 if(
agNULL == lStrIdx )
break;
412 strcat( aFullKey,
"_" );
413 strcat( aFullKey, lStrIdx );
417 strcat( aFullKey,
"_" );
418 strcat( aFullKey, aValueName );
420 *apLenFullKey = strlen( aFullKey );
481 strcpy( buffer,
"" );
483 printf(
"ostiGetTransportParam: buffer too small at only %d",
488 valueName, lFullKey, &lLenFullKey );
490 TUNABLE_STR_FETCH( lFullKey, buffer, bufferLen );
494 *lenReceived = strlen( buffer );
599 AGTIAPI_PRINTK(
"ostiPortEvent: start eventType 0x%x\n", eventType);
621#ifdef INITIATOR_DRIVER
622#ifndef HOTPLUG_SUPPORT
634#ifdef INITIATOR_DRIVER
635#ifndef HOTPLUG_SUPPORT
693 DELAY( microseconds );
#define AGTIAPI_RESET_SUCCESS
#define LOW_32_BITS(addr)
#define PORTAL_STATUS(pPortalData)
#define AGTIAPI_PORT_SHUTDOWN
#define AGTIAPI_PORT_DISC_READY
#define AGTIAPI_PORT_PANIC
#define TIROOT_TO_CARD(ptiRoot)
#define AGTIAPI_INIT_TIME
#define HIGH_32_BITS(addr)
#define AGTIAPI_PRINTK(format, a...)
#define AGTIAPI_PORT_START
#define TIROOT_TO_PCIDEV(ptiRoot)
#define TIROOT_TO_CARDINFO(ptiRoot)
#define AGTIAPI_PORT_STOPPED
#define AGTIAPI_DYNAMIC_MAX
#define AGTIAPI_PORT_LINK_UP
#define PORTAL_CONTEXT_TO_PORTALDATA(pPortalContext)
struct agtiapi_softc * pCard
U32 ostiTimeStamp(tiRoot_t *ptiRoot)
GLOBAL void ostiInterruptEnable(tiRoot_t *ptiRoot, bit32 channelNum)
void ostiChipWriteBit32(tiRoot_t *ptiRoot, U32 chipOffset, U32 chipValue)
U32 ostiChipConfigReadBit32(tiRoot_t *ptiRoot, U32 chipConfigOffset)
U32 ostiChipReadBit32(tiRoot_t *ptiRoot, U32 chipOffset)
osGLOBAL U32 ostiFreeMemory(tiRoot_t *ptiRoot, void *osMemHandle, U32 allocLength)
void ostiChipConfigWriteBit32(tiRoot_t *ptiRoot, U32 chipConfigOffset, U32 chipConfigValue)
osGLOBAL U32 ostiAllocMemory(tiRoot_t *ptiRoot, void **osMemHandle, void **agVirtAddr, U32 *agPhysUpper32, U32 *agPhysLower32, U32 alignment, U32 allocLength, agBOOLEAN isCacheable)
void ostiChipWriteBit32Ext(tiRoot_t *ptiRoot, U32 busBaseNumber, U32 chipOffset, U32 aData)
osGLOBAL void ostiIOCTLWaitForSignal(tiRoot_t *ptiRoot, void *agParam1, void *agParam2, void *agParam3)
void ostiFlashReadBlock(tiRoot_t *ptiRoot, U32 offset, void *bufPtr, U32 nbytes)
osGLOBAL void ostiIOCTLSetSignal(tiRoot_t *ptiRoot, void *agParam1, void *agParam2, void *agParam3)
U32 ostiChipReadBit32Ext(tiRoot_t *ptiRoot, U32 busBaseNumber, U32 chipOffset)
GLOBAL void ostiInterruptDisable(tiRoot_t *ptiRoot, bit32 channelNum)
void ostiChipWriteBit8(tiRoot_t *ptiRoot, U32 chipOffset, U08 chipValue)
U32 ostiGetTransportParam(tiRoot_t *ptiRoot, S08 *key, S08 *subkey1, S08 *subkey2, S08 *subkey3, S08 *subkey4, S08 *subkey5, S08 *valueName, S08 *buffer, U32 bufferLen, U32 *lenReceived)
osGLOBAL void ostiIOCTLClearSignal(tiRoot_t *ptiRoot, void **agParam1, void **agParam2, void **agParam3)
osGLOBAL void ostiIOCTLComplete(tiRoot_t *ptiRoot, void *agParam1, void *agParam2, void *agParam3)
MALLOC_DEFINE(M_PMC_OSTI, "osti_cacheable", "allocated from ostiAllocMemory as cacheable memory")
osGLOBAL void ostiCacheInvalidate(tiRoot_t *ptiRoot, void *osMemHandle, void *virtPtr, bit32 length)
void ostiStallThread(tiRoot_t *ptiRoot, U32 microseconds)
osGLOBAL void ostiCacheFlush(tiRoot_t *ptiRoot, void *osMemHandle, void *virtPtr, bit32 length)
void ostiPortEvent(tiRoot_t *ptiRoot, tiPortEvent_t eventType, U32 status, void *pParm)
osGLOBAL void ostiCachePreFlush(tiRoot_t *tiRoot, void *osMemHandle, void *virtPtr, bit32 length)
U08 ostiChipReadBit8(tiRoot_t *ptiRoot, U32 chipOffset)
U64 ostiTimeStamp64(tiRoot_t *ptiRoot)
static U32 ostiMakeParamString(S08 *aKey, S08 *aSubkey1, S08 *aSubkey2, S08 *aSubkey3, S08 *aSubkey4, S08 *aSubkey5, S08 *aValueName, S08 *aFullKey, U32 *apLenFullKey)
osGLOBAL void ostiIOCTLWaitForComplete(tiRoot_t *ptiRoot, void *agParam1, void *agParam2, void *agParam3)
ag_dma_addr_t * freeDynamicMem[AGTIAPI_DYNAMIC_MAX]
bus_addr_t nocache_busaddr
ag_portal_info_t portalInfo
tiPortalContext_t tiPortalContext
ag_portal_data_t * pPortalData
ag_card_info_t * pCardInfo
osGLOBAL bit32 tiINIDiscoverTargets(tiRoot_t *tiRoot, tiPortalContext_t *portalContext, bit32 option)
#define FORCE_PERSISTENT_ASSIGN_MASK