[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Understanding the Diagnostic Subsystem for AIX

pdiag_dd_dma_enable

Purpose

The pdiag_dd_dma_enable() function enables and disables a DMA operation. The actual function performed depends on the bus type and operation requested.

Syntax

#include <sys/pdiagex_dds.h>
int32 pdiag_dd_dma_enable( handle, daddr, operation )
pdiag_info_handle_t>  handle; 
pdiag_addr_t  daddr;
uint32 operation;

Description

Where bus type = BUS_MICRO_CHANNEL and operation is PDIAG_DMA_FLUSH

Where bus type = BUS_MICRO_CHANNEL or BUS_BID and operation is PDIAG_DMA_DISABLE

Where bus type = BUS_MICRO_CHANNEL or BUS_BID and operation is PDIAG_DMA_ENABLE

Execution Environment

The pdiag_dd_dma_enable() function can be called from the process or the interrupt environment on a BUS_MICRO_CHANNEL system. The function can only be called from the process environment on a BUS_BID system.

Parameters

handle Points to pdiag_info_handle_t structure which is returned from pdiag_open ().
daddr Pointer to the user's physical DMA address. This is returned by pdiag_dd_dma_setup() routine.
operation Type of operation to perform:

PDIAG_DMA_ENABLE
PDIAG_DMA_DISABLE
PDIAG_DMA_FLUSH

Return Value

The pdiag_dd_dma_enable function returns one of the following values:

DGX_OK The operation was successful. The errno is not set.
DGX_INVALID_HANDLE Specified handle has been closed or was not generated by the pdiag_open() call. The errno is not set.
DGX_BADVAL_FAIL Specified daddr is not valid. The errno is not set.
DGX_FAIL Application could not transfer data between the processor and the I/O controller (IOCC) data caches. The errno is set to the d_cflush or d_bflush return code.

Related Information

pdiag_dd_dma_setup() and pdiag_dd_dma_complete() functions.


[ Previous | Next | Contents | Home | Search ]