Expand Minimize

WdfDmaEnablerSetMaximumScatterGatherElements method

[Applies to KMDF only]

The WdfDmaEnablerSetMaximumScatterGatherElements method sets the maximum number of scatter/gather elements that a device supports, for a specified DMA enabler object.

Syntax


VOID WdfDmaEnablerSetMaximumScatterGatherElements(
  [in]  WDFDMAENABLER DmaEnabler,
  [in]  size_t MaximumFragments
);

Parameters

DmaEnabler [in]

A handle to a DMA enabler object that the driver obtained from a previous call to WdfDmaEnablerCreate.

MaximumFragments [in]

The maximum number of scatter/gather elements that the driver and device can support.

Return value

None.

A bug check occurs if the driver supplies an invalid object handle.

Remarks

If your driver calls WdfDmaEnablerSetMaximumScatterGatherElements, it must do so within the EvtDriverDeviceAdd or EvtDevicePrepareHardware callback function.

If your driver does not call WdfDmaEnablerSetMaximumScatterGatherElements, the framework uses a default value of WDF_DMA_ENABLER_UNLIMITED_FRAGMENTS, which means that there is no limit to the number of scatter/gather elements.

For more information about this method, see Enabling DMA Transactions.

Examples

The following code example sets the maximum number of scatter/gather elements for a specified DMA enabler object.


WdfDmaEnablerSetMaximumScatterGatherElements(
                                             DmaEnabler, 
                                             NIC_MAX_PHYS_BUF_COUNT
                                             );

Requirements

Minimum KMDF version

1.0

Header

Wdfdmaenabler.h (include Wdf.h)

Library

Wdf01000.sys (see Framework Library Versioning.)

IRQL

PASSIVE_LEVEL

DDI compliance rules

DriverCreate, KmdfIrql, KmdfIrql2

See also

WdfDmaEnablerCreate
WdfDmaEnablerGetMaximumScatterGatherElements

 

 

Send comments about this topic to Microsoft

顯示:
© 2014 Microsoft