NDIS_STATUS
NdisMRegisterDmaChannel(
OUT PNDIS_HANDLE MiniportDmaHandle,
IN NDIS_HANDLE MiniportAdapterHandle,
IN UINT DmaChannel,
IN BOOLEAN Dma32BitAddresses,
IN PNDIS_DMA_DESCRIPTION DmaDescription,
IN ULONG MaximumLength
);
NdisMRegisterDmaChannel claims a system DMA controller channel during initialization for DMA operations on a slave NIC or on an ISA busmaster NIC.
typedef struct _NDIS_DMA_DESCRIPTION { BOOLEAN DemandMode; BOOLEAN AutoInitialize; BOOLEAN DmaChannelSpecified; DMA_WIDTH DmaWidth; DMA_SPEED DmaSpeed; ULONG DmaPort; ULONG DmaChannel; } NDIS_DMA_DESCRIPTION, *PNDIS_DMA_DESCRIPTION;
The driver should initialize this structure with zeros before filling in the following members:
NdisMRegisterDmaChannel can return one of the following status values:
A driver of a slave-DMA NIC must call NdisMRegisterDmaChannel from its MiniportInitialize function to reserve system resources for subsequent DMA operations and to claim them in the registry.
The driver of an ISA busmaster NIC also must call NdisMRegisterDmaChannel from MiniportInitialize to claim a system DMA controller channel for its NIC in the registry.
MiniportInitialize must call NdisMSetAttributes or NdisMSetAttributesEx before calling NdisMRegisterDmaChannel.
MiniportInitialize obtained the bus-relative values passed to NdisMRegisterDmaChannel either from the registry or by calling a bus-type-specific NdisXxx configuration function.
If such a driver cannot allocate the system DMA resources that its device needs, MiniportInitialize should release all resources it already allocated for its NIC and, then, fail initialization for that NIC.
Callers of NdisMRegisterDmaChannel run at IRQL PASSIVE_LEVEL.
MiniportInitialize, NdisMCompleteDmaTransfer, NdisMDeregisterDmaChannel, NdisMPciAssignResources, NdisMSetAttributes, NdisMSetAttributesEx, NdisMSetupDmaTransfer, NdisOpenConfiguration, NdisReadEisaSlotInformation, NdisReadMcaPosInformation, NdisReadPciSlotInformation