[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

d_init Kernel Service


Initializes a direct memory access (DMA) channel.


#include <sys/types.h>
#include <sys/errno.h>
#include <sys/dma.h>
#include <sys/adspace.h>
int d_init (channel, flags, bus_id)
int channel;
int flags;
vmhandle_t bus_id;


channel Specifies the DMA channel number.
flags Specifies the flags that describe how the DMA channel is used. These flags are described in the /usr/include/sys/dma.h file.
bus_id Identifies the I/O bus that the channel is to be allocated on. This parameter is normally passed to the device driver in the Device-Dependent Structure at driver initialization time.


The d_init kernel service initializes a DMA channel. A device driver must call this service before using the DMA channel. Initializing the DMA channel entails:

The d_init service is typically called by a device driver in its open routine when the device is not already in the opened state. A device driver must call the d_init service before using the DMA channel.

Execution Environment

The d_init kernel service can be called from either the process or interrupt environment.

Return Values

channel_id Indicates a successful operation. This value is used as an input parameter to the other DMA routines.
DMA_FAIL Indicates that the DMA channel is not available because it is currently allocated.

Implementation Specifics

The d_init kernel service is part of Base Operating System (BOS) Runtime.

Related Information

The d_clear kernel service.

I/O Kernel Services and Understanding Direct Memory Access (DMA) Transfers in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.

Device-Dependent Structure (DDS) Overview.

[ Previous | Next | Contents | Home | Search ]