NdisMCompleteDmaTransfer

VOID
   NdisMCompleteDmaTransfer(
       OUT PNDIS_STATUS
Status,
       IN PNDIS_HANDLE MiniportDmaHandle,
       IN PNDIS_BUFFER Buffer,
       IN ULONG Offset,
       IN ULONG Length,
       IN BOOLEAN WriteToDevice
       );

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

Parameters

Status

Points 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

Specifies the handle returned when MiniportInitialize called NdisMRegisterDmaChannel.

Buffer

Points to the buffer descriptor previously passed to NdisMSetupDmaTransfer.

Offset

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

Length

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

WriteToDevice

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

Comments

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.

Callers of NdisMCompleteDmaTransfer run at IRQL <= DISPATCH_LEVEL.

See Also

MiniportHandleInterrupt, MiniportInitialize, MiniportTimer, NdisMDeregisterDmaChannel, NdisMRegisterDmaChannel, NdisMSetupDmaTransfer