Previous Next

IPortWavePci::NewMasterDmaChannel

The NewMasterDmaChannel method creates a new instance of a bus-master DMA channel.

NTSTATUS
  NewMasterDmaChannel(
    OUT PDMACHANNEL  *DmaChannel,
    IN PUNKNOWN  OuterUnknown OPTIONAL,
    IN POOL_TYPE  PoolType,
    IN PRESOURCELIST  ResourceList OPTIONAL,
    IN BOOLEAN  ScatterGather,
    IN BOOLEAN  Dma32BitAddresses,
    IN BOOLEAN  Dma64BitAddresses,
    IN BOOLEAN  IgnoreCount,
    IN DMA_WIDTH  DmaWidth,
    IN DMA_SPEED  DmaSpeed
    IN ULONG  MaximumLength,
    IN ULONG  DmaPort
    );

Parameters

DmaChannel
Output pointer for the DMA channel. This parameter points to a caller-allocated pointer variable into which the method writes a pointer to the new DMA-channel object’s IDmaChannel interface.
OuterUnknown
Pointer to the IUnknown interface of an object that needs to aggregate the DMA-channel object. This parameter is optional. If aggregation is not required, specify this parameter as NULL.
PoolType
Specifies the type of storage pool from which the object is to be allocated. This is a POOL_TYPE enumeration value. Specify a nonpaged pool type for this parameter.
ResourceList
Pointer to the miniport driver's resource list, which is an IResourceList object. This parameter is optional and can be specified as NULL. The NewMasterDmaChannel method currently makes no use of this parameter.
ScatterGather
Requests that the DMA channel support scatter/gather DMA. Always set this parameter to TRUE.
Dma32BitAddresses
Specifies the use of 32-bit addresses for DMA operations.
Dma64BitAddresses
Specifies the use of 64-bit addresses for DMA operations.
IgnoreCount
Indicates whether to ignore the DMA controller's transfer counter. Set to TRUE if the DMA controller in this platform does not maintain an accurate transfer counter, and therefore requires a workaround.
DmaWidth
Not used. Set to (DMA_WIDTH)(-1).
DmaSpeed
Not used. Set to (DMA_SPEED)(-1).
MaximumLength
Maximum number of bytes in the buffer that will be associated with this DMA channel.
DmaPort
Not used. Set to 0.

Return Value

NewMasterDmaChannel returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an appropriate error code.

Headers

Declared in portcls.h. Include portcls.h.

Comments

The definitions of the call parameters for the NewMasterDmaChannel method are similar to those for the members of the DEVICE_DESCRIPTION structure with the same names.

Specify the PoolType parameter to be one of the nonpaged pool types defined in the POOL_TYPE enumeration. The DMA-channel object must not reside in paged memory because several of the methods in the IDmaChannel interface can be called from IRQL DISPATCH_LEVEL.

The DmaChannel, OuterUnknown, and ResourceList parameters follow the reference-counting conventions for COM objects.

See Also

IDmaChannel, IResourceList, DEVICE_DESCRIPTION, POOL_TYPE