NdisMCompleteDmaTransfer macro

The NdisMCompleteDmaTransfer function indicates that a system DMA transfer operation has completed. It resets the system DMA controller in preparation for further DMA transfers.

Syntax


VOID NdisMCompleteDmaTransfer(
  [out] PNDIS_STATUS Status,
  [in]  NDIS_HANDLE  MiniportDmaHandle,
  [in]  PNDIS_BUFFER Buffer,
  [in]  ULONG        Offset,
  [in]  ULONG        Length,
  [in]  BOOLEAN      WriteToDevice
);

Parameters

Status [out]

A pointer to a caller-supplied variable in which this function returns the final status of the DMA transfer, which can be one of the following:

NDIS_STATUS_SUCCESS

The data has been transferred and flushed to host memory or to the device to maintain data integrity.

NDIS_STATUS_RESOURCES

The DMA controller was released but the data transfer might be incoherent.

MiniportDmaHandle [in]

The handle returned when the MiniportInitializeEx function called the NdisMRegisterDmaChannel function.

Buffer [in]

A pointer to the buffer descriptor previously passed to NdisMSetupDmaTransfer.

Offset [in]

The byte offset at which the transfer began. This value also was passed to NdisMSetupDmaTransfer.

Length [in]

The length in bytes of the transfer. This value also was passed to NdisMSetupDmaTransfer.

WriteToDevice [in]

TRUE if the transfer was from the host to the NIC, as, for example, a send operation.

Return value

None

Remarks

NdisMCompleteDmaTransfer must be called with WriteToDevice set to TRUE before the transferred data is considered present in the NIC's memory. NdisMCompleteDmaTransfer must be called with WriteToDevice set to FALSE before the transferred data can be read from host memory.

Requirements

Target platform

Universal

Version

Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisMCompleteDmaTransfer (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisMCompleteDmaTransfer (NDIS 5.1)) in Windows XP.

Header

Ndis.h (include Ndis.h)

IRQL

<= DISPATCH_LEVEL

DDI compliance rules

Irql_MCO_Function

See also

MiniportInitializeEx
NdisMRegisterDmaChannel
NdisMSetupDmaTransfer

 

 

Send comments about this topic to Microsoft

Show: