我的 PCIe FPGA 设备驱动程序基于 7600.16385.1\src\general\PLX9x5x
在应用程序中的 ReadFile 中,调用 PLxEvtIoRead:
//
// Initialize this new DmaTransaction.
//
status = WdfDmaTransactionInitializeUsingRequest(
devExt->ReadDmaTransaction,
Request,
PLxEvtProgramReadDma,
WdfDmaDirectionReadFromDevice );
//
// Execute this DmaTransaction.
//
status = WdfDmaTransactionExecute( devExt->ReadDmaTransaction,
WDF_NO_CONTEXT);
....
Upon calling to WdfDmaTransactionExecute, PLxEvtProgramReadDma is called.
BOOLEAN
PLxEvtProgramReadDma(
IN WDFDMATRANSACTION Transaction,
IN WDFDEVICE Device,
IN WDFCONTEXT Context,
IN WDF_DMA_DIRECTION Direction,
IN PSCATTER_GATHER_LIST SgList
)
{
KdPrint ((???SgList->NumberOfElements = %d\n???,SgList->NumberOfElements));
}
问题:我想通过这个 Scatter/Gather 列表(大约 1 GB)传输大量数据,但 NumberOfElements 似乎受到某些限制,不知何故,大传输是 1MB(列表中的 255 个元素,每个 4k)。我将以下函数中的 MaximumTransfecrLength 更改为 500MB:
WDF_DMA_ENABLER_CONFIG_INIT(&dmaConfig,
WdfDmaProfileScatterGatherDuplex,
deviceContext->MaximumTransferLength);
但我仍然不能传输超过 1MB。限制 NumberOfElements 的原因是什么,我该如何解决?