信息
您所需的主题如下所示。但此主题未包含在此库中。

WdfDmaEnablerSetMaximumScatterGatherElements 方法

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

语法

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

参数

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.

返回值

None.

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.

示例

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

要求

版本

Available in version 1.0 and later versions of KMDF.

标头

Wdfdmaenabler.h (包括Wdf.h)

Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)

IRQL

PASSIVE_LEVEL

另请参见

WdfDmaEnablerCreate
WdfDmaEnablerGetMaximumScatterGatherElements

 

 

社区附加资源

显示:
© 2015 Microsoft