NdisCompleteDmaTransfer

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

NdisCompleteDmaTransfer is called by the NIC driver to indicate that a DMA transfer between host and network interface card has completed.

Parameters

Status

Points to the caller-supplied variable in which this function returns the status of the transfer completion. Possible values are:

NDIS_STATUS_RESOURCES
NDIS_STATUS_SUCCESS

NdisDmaHandle

Points to the handle that the NDIS interface library associates with the DMA channel.

Buffer

Points to the DMA buffer descriptor.

Offset

Specifies the DMA buffer offset.

Length

Specifies the length, in bytes, of the DMA transfer.

WriteToDevice

Specifies TRUE for a download (transmit) operation.

Comments

For a transfer from the host to the network interface card (download), the NIC driver must call NdisCompleteDmaTransfer to verify the network interface card has actually received data for transmission over the network. For a transfer from the NIC to the host (upload), the driver must call this function before the driver can read the received data from host memory.

NdisCompleteDmaTransfer also resets the host DMA controller in preparation for further DMA transfers.

Callers of NdisCompleteDmaTransfer run at IRQL <= DISPATCH_LEVEL.

See Also

NdisReadDmaCounter, NdisSetupDmaTransfer