[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

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

Parameter Description
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:

Return Value Description
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

The pdiag_dd_dma_setup and pdiag_dd_dma_complete subroutines.

pdiag_shared_slot

Purpose

Finds all devices that share a slot with the requested device.

Syntax

#include <sys/pdiag_def.h>
int32 pdiag_shared_slot (char *device_instance)

Description

The pdiag_shared_slot subroutine finds the siblings of a device and then attempts to determine which siblings are on the same slot. Under some circumstances this function may return more devices sharing a slot than physically exist. This function will always return the device instance at the front of the list, if there are no other devices sharing the slot, the function will return a pointer to the device instance.

Note
This subroutine function will return adapters that are in available and in defined state. It is the responsibility of the calling application to determine if any of the adapters have been removed from the system.

Parameters

Parameter Description
device_instance Name of device under test.

Return Value

The pdiag_shared_slot subroutine returns one of the following values:

Return Value Description
A pointer to the head of a doubly-linked list Successful return.
Note
The device_instance lies at the front of the list.
NULL An error occurred while finding siblings or retrieving data from the ODM.

Related Information

The pdiag_set_eeh_option and pdiag_read_slot_reset subroutines.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]