本文整理汇总了C++中DBG_FUNC函数的典型用法代码示例。如果您正苦于以下问题:C++ DBG_FUNC函数的具体用法?C++ DBG_FUNC怎么用?C++ DBG_FUNC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DBG_FUNC函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pqisrc_configure_op_queues
/*
* Configure the operational queue parameters.
*/
int pqisrc_configure_op_queues(pqisrc_softstate_t *softs)
{
int ret = PQI_STATUS_SUCCESS;
/* Get the PQI capability,
REPORT PQI DEVICE CAPABILITY request */
ret = pqisrc_report_pqi_capability(softs);
if (ret) {
DBG_ERR("Failed to send report pqi dev capability request : %d\n",
ret);
goto err_out;
}
/* Reserve required no of slots for internal requests */
softs->max_io_for_scsi_ml = softs->max_outstanding_io - PQI_RESERVED_IO_SLOTS_CNT;
/* Decide the Op queue configuration */
pqisrc_decide_opq_config(softs);
DBG_FUNC("OUT\n");
return ret;
err_out:
DBG_FUNC("OUT failed\n");
return ret;
}
示例2: pqisrc_trigger_nmi_sis
/* Trigger a NMI as part of taking controller offline procedure */
void pqisrc_trigger_nmi_sis(pqisrc_softstate_t *softs)
{
DBG_FUNC("IN\n");
PCI_MEM_PUT32(softs, &softs->ioa_reg->host_to_ioa_db,
LEGACY_SIS_IDBR, LE_32(TRIGGER_NMI_SIS));
DBG_FUNC("OUT\n");
}
示例3: pqisrc_check_pqimode
/*
* Validate the PQI mode of adapter.
*/
int pqisrc_check_pqimode(pqisrc_softstate_t *softs)
{
int ret = PQI_STATUS_FAILURE;
int tmo = 0;
uint64_t signature = 0;
DBG_FUNC("IN\n");
/* Check the PQI device signature */
tmo = PQISRC_PQIMODE_READY_TIMEOUT;
do {
signature = LE_64(PCI_MEM_GET64(softs, &softs->pqi_reg->signature, PQI_SIGNATURE));
if (memcmp(&signature, PQISRC_PQI_DEVICE_SIGNATURE,
sizeof(uint64_t)) == 0) {
ret = PQI_STATUS_SUCCESS;
break;
}
OS_SLEEP(PQISRC_MODE_READY_POLL_INTERVAL);
} while (tmo--);
PRINT_PQI_SIGNATURE(signature);
if (tmo <= 0) {
DBG_ERR("PQI Signature is invalid\n");
ret = PQI_STATUS_TIMEOUT;
goto err_out;
}
tmo = PQISRC_PQIMODE_READY_TIMEOUT;
/* Check function and status code for the device */
COND_WAIT((PCI_MEM_GET64(softs, &softs->pqi_reg->admin_q_config,
PQI_ADMINQ_CONFIG) == PQI_ADMIN_QUEUE_CONF_FUNC_STATUS_IDLE), tmo);
if (!tmo) {
DBG_ERR("PQI device is not in IDLE state\n");
ret = PQI_STATUS_TIMEOUT;
goto err_out;
}
tmo = PQISRC_PQIMODE_READY_TIMEOUT;
/* Check the PQI device status register */
COND_WAIT(LE_32(PCI_MEM_GET32(softs, &softs->pqi_reg->pqi_dev_status, PQI_DEV_STATUS)) &
PQI_DEV_STATE_AT_INIT, tmo);
if (!tmo) {
DBG_ERR("PQI Registers are not ready\n");
ret = PQI_STATUS_TIMEOUT;
goto err_out;
}
DBG_FUNC("OUT\n");
return ret;
err_out:
DBG_FUNC("OUT failed\n");
return ret;
}
示例4: pqisrc_pqi_uninit
/*
* Uninitialize the resources used during PQI initialization.
*/
void pqisrc_pqi_uninit(pqisrc_softstate_t *softs)
{
int i;
DBG_FUNC("IN\n");
if(softs->devlist_lockcreated==true){
os_uninit_spinlock(&softs->devlist_lock);
softs->devlist_lockcreated = false;
}
for (i = 0; i < softs->num_op_raid_ibq; i++) {
/* OP RAID IB Q */
if(softs->op_raid_ib_q[i].lockcreated==true){
OS_UNINIT_PQILOCK(&softs->op_raid_ib_q[i].lock);
softs->op_raid_ib_q[i].lockcreated = false;
}
/* OP AIO IB Q */
if(softs->op_aio_ib_q[i].lockcreated==true){
OS_UNINIT_PQILOCK(&softs->op_aio_ib_q[i].lock);
softs->op_aio_ib_q[i].lockcreated = false;
}
}
/* Free Op queues */
os_dma_mem_free(softs, &softs->op_ibq_dma_mem);
os_dma_mem_free(softs, &softs->op_obq_dma_mem);
os_dma_mem_free(softs, &softs->event_q_dma_mem);
/* Complete all pending commands. */
os_complete_outstanding_cmds_nodevice(softs);
/* Free rcb */
pqisrc_free_rcb(softs, softs->max_outstanding_io + 1);
/* Free request id lists */
pqisrc_destroy_taglist(softs,&softs->taglist);
if(softs->admin_ib_queue.lockcreated==true){
OS_UNINIT_PQILOCK(&softs->admin_ib_queue.lock);
softs->admin_ib_queue.lockcreated = false;
}
/* Free Admin Queue */
os_dma_mem_free(softs, &softs->admin_queue_dma_mem);
/* Switch back to SIS mode */
if (pqisrc_force_sis(softs)) {
DBG_ERR("Failed to switch back the adapter to SIS mode!\n");
}
DBG_FUNC("OUT\n");
}
示例5: sis_disable_intx
void sis_disable_intx(pqisrc_softstate_t *softs)
{
uint32_t db_reg;
DBG_FUNC("IN\n");
db_reg = PCI_MEM_GET32(softs, &softs->ioa_reg->host_to_ioa_db,
LEGACY_SIS_IDBR);
db_reg &= ~SIS_ENABLE_INTX;
PCI_MEM_PUT32(softs, &softs->ioa_reg->host_to_ioa_db,
LEGACY_SIS_IDBR, db_reg);
DBG_FUNC("OUT\n");
}
示例6: PGPnetPMFailedSA
NDIS_STATUS
PGPnetPMFailedSA(PGPnetPMContext *pContext,
void *data,
UINT dataLen,
ULONG *pSrcBufferLen)
{
DBG_FUNC("PGPnetPMFailedSA")
PGPikeMTSAFailed * pSAFailed = (PGPikeMTSAFailed*)data;
DBG_ENTER();
*pSrcBufferLen = sizeof(PGPikeMTSAFailed);
if (dataLen != *pSrcBufferLen) {
DBG_LEAVE(NDIS_STATUS_INVALID_LENGTH);
return NDIS_STATUS_INVALID_LENGTH;
}
PMRemovePendingSA(pContext, pSAFailed->ipAddress,
pSAFailed->u.ipsec.ipAddrStart,
pSAFailed->u.ipsec.ipMaskEnd);
*pSrcBufferLen = 0;
DBG_LEAVE(NDIS_STATUS_SUCCESS);
return NDIS_STATUS_SUCCESS;
}
示例7: pqisrc_uninit
/*
* Uninitialize the adapter.
*/
void pqisrc_uninit(pqisrc_softstate_t *softs)
{
DBG_FUNC("IN\n");
pqisrc_pqi_uninit(softs);
pqisrc_sis_uninit(softs);
os_destroy_semaphore(&softs->scan_lock);
os_destroy_intr(softs);
pqisrc_cleanup_devices(softs);
DBG_FUNC("OUT\n");
}
示例8: PolicyManagerInitialize
NDIS_STATUS PolicyManagerInitialize(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath,
OUT PNDIS_HANDLE PolicyManagerHandle
)
{
DBG_FUNC("PolicyManagerInitialize")
NDIS_STATUS status;
PGPnetPMContext *pContext = 0;
PGPError err = kPGPError_NoErr;
NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress = NDIS_PHYSICAL_ADDRESS_CONST(-1, -1);
#ifdef PM_EMULATION
PDummySA dummySA;
#endif
DBG_ENTER();
status = NdisAllocateMemory(PolicyManagerHandle,
sizeof(PGPnetPMContext),
0,
HighestAcceptableAddress
);
#ifndef PM_EMULATION
if (status != NDIS_STATUS_SUCCESS)
{
DBG_PRINT(("!!!!! NdisAllocateMemory failed status=%Xh\n", status););
示例9: wl_get_tallies
int wl_get_tallies(struct wl_private *lp,
CFG_HERMES_TALLIES_STRCT *tallies)
{
int ret = 0;
int status;
CFG_HERMES_TALLIES_STRCT *pTallies;
DBG_FUNC( "wl_get_tallies" );
DBG_ENTER(DbgInfo);
/* Get the current tallies from the adapter */
lp->ltvRecord.len = 1 + HCF_TOT_TAL_CNT * sizeof(hcf_16);
lp->ltvRecord.typ = CFG_TALLIES;
status = hcf_get_info(&(lp->hcfCtx), (LTVP)&(lp->ltvRecord));
if( status == HCF_SUCCESS ) {
pTallies = (CFG_HERMES_TALLIES_STRCT *)&(lp->ltvRecord.u.u32);
memcpy(tallies, pTallies, sizeof(*tallies));
DBG_TRACE( DbgInfo, "Get tallies okay, dixe: %d\n", sizeof(*tallies) );
} else {
DBG_TRACE( DbgInfo, "Get tallies failed\n" );
ret = -EFAULT;
}
DBG_LEAVE( DbgInfo );
return ret;
}
示例10: pqisrc_free_rcb
/*
* Function used to deallocate the used rcb.
*/
void pqisrc_free_rcb(pqisrc_softstate_t *softs, int req_count)
{
uint32_t num_req;
size_t size;
int i;
DBG_FUNC("IN\n");
num_req = softs->max_outstanding_io + 1;
size = num_req * sizeof(rcb_t);
for (i = 1; i < req_count; i++)
os_dma_mem_free(softs, &softs->sg_dma_desc[i]);
os_mem_free(softs, (void *)softs->rcb, size);
softs->rcb = NULL;
DBG_FUNC("OUT\n");
}
示例11: wl_adapter_attach
/*******************************************************************************
* wl_adapter_attach()
*******************************************************************************
*
* DESCRIPTION:
*
* Creates an instance of the driver, allocating local data structures for
* one device. The device is registered with Card Services.
*
* PARAMETERS:
*
* none
*
* RETURNS:
*
* pointer to an allocated dev_link_t structure
* NULL on failure
*
******************************************************************************/
static int wl_adapter_attach(struct pcmcia_device *link)
{
struct net_device *dev;
struct wl_private *lp;
/*--------------------------------------------------------------------*/
DBG_FUNC("wl_adapter_attach");
DBG_ENTER(DbgInfo);
dev = wl_device_alloc();
if (dev == NULL) {
DBG_ERROR(DbgInfo, "wl_device_alloc returned NULL\n");
return -ENOMEM;
}
link->resource[0]->end = HCF_NUM_IO_PORTS;
link->resource[0]->flags= IO_DATA_PATH_WIDTH_16;
link->config_flags |= CONF_ENABLE_IRQ;
link->config_index = 5;
link->config_regs = PRESENT_OPTION;
link->priv = dev;
lp = wl_priv(dev);
lp->link = link;
wl_adapter_insert(link);
DBG_LEAVE(DbgInfo);
return 0;
} /* wl_adapter_attach */
示例12: PGPnetRASdisconnect
void
PGPnetRASdisconnect(PVPN_ADAPTER adapter)
{
/* fire event */
DBG_FUNC("PGPnetRASdisconnect")
PGPMESSAGE_CONTEXT * kernelMessageContext;
PGPnetMessageHeader * kernelMessageHeader;
PGPUInt32 head = 0;
DBG_ENTER();
if ((adapter != NULL) && (adapter->pgpMessage != NULL)) {
kernelMessageContext = (PGPMESSAGE_CONTEXT*)(adapter->pgpMessage);
kernelMessageHeader = &kernelMessageContext->header;
NdisAcquireSpinLock(&adapter->general_lock);
head = kernelMessageHeader->head + 1;
if (head > kernelMessageHeader->maxSlots)
head = 1;
kernelMessageContext = &kernelMessageContext[head];
kernelMessageContext->messageType = PGPnetMessageRASdisconnect;
kernelMessageHeader->head = head;
NdisReleaseSpinLock(&adapter->general_lock);
PgpEventSet(&adapter->pgpEvent);
}
DBG_LEAVE(0);
}
示例13: wl_adapter_open
/*******************************************************************************
* wl_adapter_open()
*******************************************************************************
*
* DESCRIPTION:
*
* Open the device.
*
* PARAMETERS:
*
* dev - a pointer to a net_device structure representing the network
* device to open.
*
* RETURNS:
*
* 0 on success
* errno value otherwise
*
******************************************************************************/
int wl_adapter_open(struct net_device *dev)
{
struct wl_private *lp = wl_priv(dev);
struct pcmcia_device *link = lp->link;
int result = 0;
int hcf_status = HCF_SUCCESS;
/*--------------------------------------------------------------------*/
DBG_FUNC("wl_adapter_open");
DBG_ENTER(DbgInfo);
DBG_PRINT("%s\n", VERSION_INFO);
DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
if (!pcmcia_dev_present(link)) {
DBG_LEAVE(DbgInfo);
return -ENODEV;
}
link->open++;
hcf_status = wl_open(dev);
if (hcf_status != HCF_SUCCESS) {
link->open--;
result = -ENODEV;
}
DBG_LEAVE(DbgInfo);
return result;
} /* wl_adapter_open */
示例14: wl_process_updated_record
/*******************************************************************************
* wl_process_updated_record()
*******************************************************************************
*
* DESCRIPTION:
*
* Process the updated information record message signaled by the device.
*
* PARAMETERS:
*
* lp - a pointer to the device's private structure
*
* RETURNS:
*
* N/A
*
******************************************************************************/
void wl_process_updated_record( struct wl_private *lp )
{
DBG_FUNC( "wl_process_updated_record" );
DBG_ENTER( DbgInfo );
if( lp != NULL ) {
lp->updatedRecord.u.u16[0] = CNV_LITTLE_TO_INT( lp->updatedRecord.u.u16[0] );
switch( lp->updatedRecord.u.u16[0] ) {
case CFG_CUR_COUNTRY_INFO:
DBG_TRACE( DbgInfo, "Updated Record: CFG_CUR_COUNTRY_INFO\n" );
wl_connect( lp );
break;
case CFG_PORT_STAT:
DBG_TRACE( DbgInfo, "Updated Record: WAIT_FOR_CONNECT (0xFD40)\n" );
//wl_connect( lp );
break;
default:
DBG_TRACE( DbgInfo, "UNKNOWN: 0x%04x\n",
lp->updatedRecord.u.u16[0] );
}
}
DBG_LEAVE( DbgInfo );
return;
} // wl_process_updated_record
示例15: wl_adapter_attach
static int wl_adapter_attach(struct pcmcia_device *link)
{
struct net_device *dev;
struct wl_private *lp;
/*------------------------------------------------------------------------*/
DBG_FUNC( "wl_adapter_attach" );
DBG_ENTER( DbgInfo );
dev = wl_device_alloc();
if(dev == NULL) {
DBG_ERROR( DbgInfo, "wl_device_alloc returned NULL\n");
return -ENOMEM;
}
link->io.NumPorts1 = HCF_NUM_IO_PORTS;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
link->io.IOAddrLines = 6;
link->conf.Attributes = CONF_ENABLE_IRQ;
link->conf.IntType = INT_MEMORY_AND_IO;
link->conf.ConfigIndex = 5;
link->conf.Present = PRESENT_OPTION;
link->priv = dev;
lp = wl_priv(dev);
lp->link = link;
wl_adapter_insert(link);
DBG_LEAVE( DbgInfo );
return 0;
} // wl_adapter_attach