阅读:1084回复:2
pci9054得dma重启。
各位大哥:
我用ddk写9054得dma驱动,在irp_mn_start_device里调用 iogetdmaadarpter时,机子就会重启,说遇到了无法解决得内核错误。cuozainali? RtlZeroMemory( &dd, sizeof(dd) ); dd.Version = DEVICE_DESCRIPTION_VERSION; dd.Master = TRUE; // this is a MASTER device dd.ScatterGather = FALSE; dd.DemandMode =TRUE; dd.AutoInitialize = FALSE; dd.Dma32BitAddresses = TRUE; dd.InterfaceType = PCIBus; dd.MaximumLength = MAX_DMA_LENGTH; dd.DmaWidth = Width32Bits; dd.DmaSpeed = Compatible; // Compute the maximum number of mapping regs // this device could possibly need. Since the // transfer may not be paged aligned, add one // to allow the max xfer size to span a page. pDevExt->mapRegisterCount = (MAX_DMA_LENGTH / PAGE_SIZE) + 1; pDevExt->pDmaAdapter = IoGetDmaAdapter( pDevObj, & dd, &pDevExt->mapRegisterCount); |
|
沙发#
发布于:2004-09-15 16:10
你为什么还要调用IoGetDmaAdapter()呢?
PCI做DMA传输时,一般是有自己的DMA主控器的. |
|
板凳#
发布于:2004-09-17 11:32
那你是怎么做的呢?
|
|