Registering and Deregistering DMA Channels

An NDIS miniport driver calls the NdisMRegisterScatterGatherDma function from its MiniportInitializeEx function to register a DMA channel with NDIS.

The miniport driver passes a DMA description to NdisMRegisterScatterGatherDma in the DmaDescription parameter. NdisMRegisterScatterGatherDma returns a size for the buffer that should be large enough to hold the scatter/gather list. Miniport drivers should use this size to preallocate the storage for scatter/gather lists.

The miniport driver also passes NdisMRegisterScatterGatherDma the entry points for the MiniportXxx functions that NDIS calls to process the scatter/gather list. NDIS calls the miniport driver's MiniportProcessSGList function after HAL has built the scatter/gather list for a buffer. NdisMRegisterScatterGatherDma supplies a handle in the pNdisMiniportDmaHandle parameter, which the miniport driver must use in subsequent calls to NDIS scatter/gather DMA functions.

An NDIS miniport driver calls the NdisMDeregisterScatterGatherDma function from its MiniportHaltEx function to release scatter/gather DMA resources.

Allocating and Freeing Scatter/Gather Lists

Miniport Driver Scatter/Gather DMA

NDIS Scatter/Gather DMA