Hi all,
Subject: Bus Master Packet Based Scatter Gather DMA (PCI)
Somehow the GetScatterGatherlist function
allways return STATUS_INSUFFICIENT_RESOURCES.
Even if for example:
MapRegsAvailable : 16384 (returned by IoGetDmaAdapter)
MapRegsNeeded : 2048 (Needed for current transfer)
MapRegsGot : 2048 (After check through
ADDRES_AND_SIZE_TO_SPAN_PAGES)
Any ideas what the problem could be?
TIA
Assumptions:
- You allocated a DAM adapter object (ooops should be DMA)
- You provided a DAM execution routine (dam keyboard)
- You set up the MDL correctly
- You fetched CurrentVA from the MDL
- You provided the proper DO
- You only have one DAM request on the DAM queue (oh well …)
–
Gary G. Little
Have Computer, Will Travel …
909-698-3191
909-551-2105
http://www.wd-3.com
wrote in message news:xxxxx@ntdev…
>
> Hi all,
>
> Subject: Bus Master Packet Based Scatter Gather DMA (PCI)
>
> Somehow the GetScatterGatherlist function
> allways return STATUS_INSUFFICIENT_RESOURCES.
>
> Even if for example:
> MapRegsAvailable : 16384 (returned by IoGetDmaAdapter)
> MapRegsNeeded : 2048 (Needed for current transfer)
> MapRegsGot : 2048 (After check through
> ADDRES_AND_SIZE_TO_SPAN_PAGES)
>
> Any ideas what the problem could be?
>
> TIA
>
>
Thanks for your reply,
I’ve done all of that. I’ve tried
a small request (8k) and that seems
to work just fine.
The question is:
Why does IoGetDAMAdapter (oops DMA ;o))
give me too many map registers?
(MaximumLength is set to 64 MB. IoGetDmaAdapter
seems to provide me with sufficient map register
to even do a 64 Mb transfer)
And another thing:
How does DmaOps->GetScatterGatherList use bus-master
DMA? In other words: How does GetScatterGatherList
provide the hardware abstraction?
(Plx chip in my case. Do I set Plx DMA Chaining
in hardware registers?)
Thanks again!!
xxxxx@chess.nl wrote:
And another thing:
How does DmaOps->GetScatterGatherList use bus-master
DMA? In other words: How does GetScatterGatherList
provide the hardware abstraction?
(Plx chip in my case. Do I set Plx DMA Chaining
in hardware registers?)
All it does is construct a scatter/gather list. You have to program your
hardware yourself. There is a sample named SCATGATH in my WDM book that
one of my readers swears worked great when he adapted it for his
hardware.
–
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com