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-92cdfe…
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...