FreeMapRegisters routine

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

Syntax


VOID FreeMapRegisters(
  _In_  PDMA_ADAPTER DmaAdapter,
  _In_  PVOID MapRegisterBase,
  _In_  ULONG NumberOfMapRegisters
);

Parameters

DmaAdapter [in]

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

MapRegisterBase [in]

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

NumberOfMapRegisters [in]

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

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

IRQL

DISPATCH_LEVEL

DDI compliance rules

IrqlDispatch, IrqlDispatch(storport)

See also

DMA_ADAPTER
AllocateAdapterChannel
IoGetDmaAdapter
MapTransfer
DMA_OPERATIONS

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft