WdfDmaEnablerSetMaximumScatterGatherElements - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfdmaenabler.h

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

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfdmaenabler-wdfdmaenablersetmaximumscattergatherelements)

WdfDmaEnablerSetMaximumScatterGatherElements function

Description

[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.

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.

Remarks

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

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
                                             );

See also

WdfDmaEnablerCreate

WdfDmaEnablerGetMaximumScatterGatherElements