DMA_APPEND_HANDLER callback function (netdma.h)
The ProviderAppendDma function appends a linked list of DMA descriptors to the last descriptor on a DMA channel.
Syntax
DMA_APPEND_HANDLER DmaAppendHandler;
NTSTATUS DmaAppendHandler(
[in] PVOID ProviderChannelContext,
[in] PNET_DMA_DESCRIPTOR DescriptorVirtualAddress,
[in] PHYSICAL_ADDRESS DescriptorPhysicalAddress,
[in] ULONG DescriptorCount
)
{...}
Parameters
[in] ProviderChannelContext
A pointer that identifies a DMA channel's context area. The DMA provider returned this handle to NetDMA at the location that is specified in the pProviderChannelContext parameter of the ProviderAllocateDmaChannel function.
[in] DescriptorVirtualAddress
A pointer to the virtual address of the first NET_DMA_DESCRIPTOR structure in a linked list of DMA descriptors. The corresponding physical address is specified at the DescriptorPhysicalAddress parameter.
[in] DescriptorPhysicalAddress
A pointer to the physical address of the first DMA descriptor in a linked list of DMA descriptors. The corresponding virtual address is specified at the DescriptorVirtualAddress parameter.
[in] DescriptorCount
The number of DMA descriptors at DescriptorVirtualAddress .
Return value
ProviderAppendDma returns one of the following status values:
Return code | Description |
---|---|
|
The operation completed successfully. |
|
The operation failed for unspecified reasons. |
Remarks
The NetDMA interface calls a DMA provider driver's ProviderAppendDma function to append a linked list of DMA descriptors after the last descriptor on a DMA channel. The NetDMA interface can call ProviderAppendDma any number of times after a DMA transfer is started. However, the NetDMA interface must call the ProviderStartDma function after a channel reset or abort, or after the DMA channel is first allocated.
If the current descriptor in an active transfer is the last descriptor, the DMA engine must reread the last descriptor. The NextDescriptor member in the last NET_DMA_DESCRIPTOR structure should have a new address, and the DMA engine should continue with the next descriptor. If the current descriptor is not the last descriptor, the DMA engine can continue processing DMA descriptors with no additional tasks.
NetDMA calls ProviderAppendDma at IRQL <= DISPATCH_LEVEL.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Supported for NetDMA 2.0 drivers in Windows Server 2008. Supported for NetDMA 1.1 drivers in Windows Server 2008. Supported for NetDMA 1.0 drivers in Windows Server 2008 and Windows Vista. |
Target Platform | Windows |
Header | netdma.h (include Netdma.h) |
IRQL | <= DISPATCH_LEVEL |