I’m confused by the close association of “SCSI miniport driver” and
“creating the device object”. These two things are incompatible.
You set MapBuffers to TRUE in your miniport if you need to directly access
the contents of the databuffer, typically this is because your miniport is,
arghhhh, doing PIO rather than DMA.
If you set this to FALSE then Databuffer ought to indeed be the ‘user va’,
however other than curiosity and perhaps alignment, a user va in a scsi
miniport is not of any value. This field is not the MDL.
You could be a naughty hacker and poke around the memory at OriginalRequest,
which at least the w2k docs claimed:
“Points to the IRP for this request. This member is irrelevant to miniport
drivers”.
This phrase needs a little DDK-speak translation. The second sentence must
be read first, and then the first sentence must be read substituting “Does
not point” for “Points”. There then should follow a long list of other
kernel objects that OriginalRequest does not point to 
If you use scsikd in windbg you can discover that originalrequest generally
(but perhaps not always) points to an internal scsiport srb extension
object, which in turn has a pointer to the Irp, which has a pointer to the
MDL.
Of course the internal SRB structure used by scsiport is undocumented, which
is a very strong indicator that if you think you need the MDL for some
reason in your miniport driver you should re-cogitate.
-----Original Message-----
From: xxxxx@troikanetworks.com [mailto:xxxxx@troikanetworks.com]
Sent: Monday, November 05, 2001 9:19 AM
To: NT Developers Interest List
Subject: [ntdev] Mapbuffers entry
Hello!
I had a question regarding MapBuffers. The SCSI miniport driver, during
initialization must set this to true or false. The question is:
If, while creating the device object, we specify DO_DIRECT_IO, and set
MapBuffers to FALSE, what does the SRB Databuffer field signify. Its not
the kernel mapped address of the use buffer. Is it the user VA of the
buffer, or is it the Virtual address of the MDL?
From what I understand DO_DIRECT_IO sends an MDL down through the stack.
So does it mean that the DataBuffer address is an MDL?
Thanks!
You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com