VOID
NdisAllocateDmaChannel(
OUT PNDIS_STATUS Status,
OUT PNDIS_HANDLE NdisDmaHandle,
IN NDIS_HANDLE NdisAdapterHandle,
IN PNDIS_DMA_DESCRIPTION DmaDescription,
IN ULONG MaximumLength
);
NdisAllocateDmaChannel is called by the NIC driver to set up a DMA channel for future DMA operations.
NDIS_STATUS_FAILURE
NDIS_STATUS_RESOURCE_CONFLICT
NDIS_STATUS_RESOURCES
NDIS_STATUS_SUCCESS
The NDIS_DMA_DESCRIPTION structure is defined as follows:
typedef struct _NDIS_DMA_DESCRIPTION {
BOOLEAN DemandMode;
DMA_WIDTH DmaWidth;
DMA_SPEED DmaSpeed;
ULONG DmaPort;
} NDIS_DMA_DESCRIPTION, *PNDIS_DMA_DESCRIPTION;
Member |
Value |
DemandMode |
TRUE if an ISA device operates in demand mode rather than single-byte mode. |
DmaWidth |
The transfer width of the DMA operation, one of: Width8Bits, Width16Bits, or Width32Bits. |
DmaSpeed |
The transfer speed of the DMA operation, one of: Compatible, TypeA, TypeB, or TypeC. |
DmaPort |
For a NIC on an I/O bus with the interface type MicroChannel, the I/O port used. Otherwise, this member must be zero. |
Slave DMA network interface cards that initiate their own DMA operations use this function. The driver of a busmaster card does not need to allocate a DMA channel.
Callers of NdisAllocateDmaChannel run at IRQL PASSIVE_LEVEL.
MacAddAdapter, NdisFreeDmaChannel, NdisReadDmaCounter, NdisRegisterAdapter