PFREE_MAP_REGISTERS callback function

The FreeMapRegisters routine releases a set of map registers that were saved from a call to AllocateAdapterChannel.

Syntax

PFREE_MAP_REGISTERS PfreeMapRegisters;

void PfreeMapRegisters(
  PDMA_ADAPTER DmaAdapter,
  PVOID MapRegisterBase,
  ULONG NumberOfMapRegisters
)
{...}

Parameters

DmaAdapter

Pointer to the DMA_ADAPTER structure returned by IoGetDmaAdapter that represents the bus-master adapter or DMA controller.

MapRegisterBase

Specifies the map registers allocated for the DMA operation. The system passes this value to the driver's AdapterControl routine.

NumberOfMapRegisters

Specifies the number of map registers to be released. This value must match the number specified in an earlier call to AllocateAdapterChannel.

Return Value

None

Remarks

FreeMapRegisters is not a system routine that can be called directly by name. This routine is only callable by pointer from the address returned in a DMA_OPERATIONS structure. Drivers obtain the address of this routine by calling IoGetDmaAdapter.

When the driver of a bus-master device has completed the current packet-based DMA transfer request, it calls FreeMapRegisters to release the map registers previously allocated by a call to AllocateAdapterChannel and retained because its AdapterControl routine returned DeallocateObjectKeepRegisters. The driver must call FreeMapRegisters after calling FlushAdapterBuffers.

Requirements

   
Windows version Available starting with Windows 2000.
Target Platform Desktop
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
IRQL DISPATCH_LEVEL
DDI compliance rules IrqlDispatch, IrqlDispatch(storport)

See Also

AllocateAdapterChannel

DMA_ADAPTER

DMA_OPERATIONS

IoGetDmaAdapter

MapTransfer