sunhongbo_li
驱动牛犊
驱动牛犊
  • 注册日期2004-01-06
  • 最后登录2006-06-23
  • 粉丝0
  • 关注0
  • 积分20分
  • 威望2点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
阅读:1073回复:2

pci9054得dma重启。

楼主#
更多 发布于:2004-09-09 22:51
各位大哥:
    我用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);
histogram
驱动牛犊
驱动牛犊
  • 注册日期2004-08-28
  • 最后登录2006-09-07
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2004-09-15 16:10
你为什么还要调用IoGetDmaAdapter()呢?
PCI做DMA传输时,一般是有自己的DMA主控器的.
sunhongbo_li
驱动牛犊
驱动牛犊
  • 注册日期2004-01-06
  • 最后登录2006-06-23
  • 粉丝0
  • 关注0
  • 积分20分
  • 威望2点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2004-09-17 11:32
那你是怎么做的呢?
游客

返回顶部