阅读:2996回复:1
DMA IoGetDmaAdapter传输的问题
为什么我在描述符中设置好了最大传输的数大于32768(8页),可是仍然得到的是最大为8页,而且超过8也后不是没有收到数,就是死机。dd.Version = DEVICE_DESCRIPTION_VERSION1;
dd.Master = TRUE; dd.ScatterGather = FALSE; dd.Dma32BitAddresses = TRUE; dd.InterfaceType = PCIBus; dd.MaximumLength =0x10000;(任何大于32K的数均显示32k) devExt->pReadAdapter = IoGetDmaAdapter(devExt->PhysicalDeviceObject, &dd, &devExt->ReadMapRegMax); ReadMapRegMax为8, 。。。。。。。。 mapRegsNeeded = ADDRESS_AND_SIZE_TO_SPAN_PAGES(MmGetMdlVirtualAddress(pIrp->MdlAddress), pDevExt->WriteTotalLength - pDevExt->WriteOffset); if (mapRegsNeeded <= pDevExt->WriteMapRegMax) { pDevExt->WriteMapRegNeeded = mapRegsNeeded; pDevExt->WriteLength = pDevExt->WriteTotalLength - pDevExt->WriteOffset; } else { pDevExt->WriteMapRegNeeded = pDevExt->WriteMapRegMax; pDevExt->WriteLength = pDevExt->WriteMapRegMax * PAGE_SIZE; } 大于8页就只显示8的数、请问这是怎么回事,是不是哪里有限制,应如何修改,请高手指教,谢谢! |
|
沙发#
发布于:2011-04-25 10:53
修改成
dd.MaximumLength = (ULONG) -1; 试试 |
|