[ros-dev] Re: [ros-svn] [hbirr] 17665: - Copy the map registers to the buffer only, if they are used (in IoFlushAdapterBuffers).

Filip Navara xnavara at volny.cz
Tue Sep 6 01:13:51 CEST 2005


Filip Navara wrote:

> Hartmut Birr wrote:
>
>> Filip Navara wrote:
>>
>>> - At first, the UseMapRegisters variable you added to
>>> MAP_REGISTER_ENTRY structure isn't needed. IoFlushAdapterBuffers can
>>> determine the information itself and the case was clearly marked as
>>> UNIMPLEMENTED and FIXME.
>>>   
>>
>> This case isn't marked as UNIMPLEMENTED and FIXME. The using of hardware
>> scatter/gather is marked as UNIMPLEMENTED and FIXME. I've modified the
>> cache manager a little bit. The cache segments for the floppy driver
>> allocated from below the 16MB limit. I get no data from a floppy.
>>  
>>
> The UNIMPLEMENTED case is entered for any adapter that claims that it 
> can support hardware scatter/gather regardless of it being used or 
> not. A quick untested patch is attached (I'm not sure it will work, 
> since it looks like I forgot to initialize 
> MapRegisterBase->Counter...). I'm planning to look at it.
>
>>> - The byte offset is added for a reason. I know the stuff that it is
>>> supposed to solve is broken atm, but the rationale is that there can
>>> be more IoMapTransfer calls and together with
>>> MAP_REGISTER_ENTRY->Counter you can setup more transfers... It's
>>> explained in
>>> http://download.microsoft.com/download/e/b/a/eba1050f-a31d-436b-9281-92cdfeae4b45/dma.doc 
>>>
>>>   
>>
>> It makes no sense to call IoMapTransfer more than ones without a call to
>> IoFlushAdapterBuffers for the pc dma controllers. For the pc dma
>> controllers, a transfer has to be finished, before the next can be
>> started.
>>
> It applies to non-system-DMA... Quoting NT4 DDK documentation: "The 
> driver of a busmaster device with scatter/gather support can use the 
> returned logical address and updated Length value to build a 
> scatter/gather list, calling IoMapTransfer repeatedly until it has 
> used all available map registers for the transfer operation."
>
>> It is always possible to call IoFlushAdapterBuffers after each
>> transfer and before the next is started. The reference doesn't explain
>> something about to setup more transfers.
>>  
>>
> See above.
>
> I'll try to write more tomorrow, but my mind is getting foggy now...

Oh, this time with the right patch...

- Filip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dma.c.diff
Type: text/x-patch
Size: 1872 bytes
Desc: not available
Url : http://reactos.com/pipermail/ros-dev/attachments/20050906/391ba81b/dma.c.bin


More information about the Ros-dev mailing list