gung
驱动中牛
驱动中牛
  • 注册日期2001-06-10
  • 最后登录2008-04-21
  • 粉丝0
  • 关注0
  • 积分25分
  • 威望3点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
阅读:1554回复:2

又来送分喽!还是有关stream minidriver.

楼主#
更多 发布于:2002-02-01 21:45
在srb中CommandData.DataBufferArray和ScatterGatherBuffer好像都是描述的数据缓冲区,它们之间有什么关系亚,ddk中testcap里好像只用了前者,而后者的NumberOfPhysicalPages为0,但我的驱动是对应硬件的,而且支持ScatterGather功能,怎么通知上面的class driver呢,我应该把什么地址作为dma地址传送给我的卡呢?

             拜托拜托!
WindThruEars
驱动老牛
驱动老牛
  • 注册日期2002-11-17
  • 最后登录2004-07-10
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2002-02-02 02:12
fields in DataBufferArray specify virtual address which is not usable for DMA...

you should call StreamClassGetPhysicalAddress to convert this address into DMA-able physical address.

Note here it\'s possible although the virtual address here is continious, but the physical address is not, so you should check the length returned by StreamClassGetPhysicalAddress and call it looply until you get all translated physical addresses.

Sorry, I made a mistake in my last answer to your question. the PhysicalDeviceObject and ClassDeviceObject are visible to streaming miniport drivers via SRB_INITIALIZE_DEVICE.

我是假耳朵
gung
驱动中牛
驱动中牛
  • 注册日期2001-06-10
  • 最后登录2008-04-21
  • 粉丝0
  • 关注0
  • 积分25分
  • 威望3点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2002-02-02 10:10
那么,pSrb->ScatterGatherBuffer怎么用呀,由于我的硬件支持ScatterGather,是不是将DataBufferArray转化成物理地址,自己创建内存映射页,他既然提供了ScatterGatherBuffer域总是会方便一点拉
游客

返回顶部