What is TransferBufferMDL ?Salut Eric,

You can just ignore the TransferBuffer and TransferBufferMDL for purposes of
porting to Linux. It is a purely Windows WDM thing.

Just as a quick backgrounder - in WDM, you have two ways of passing memory
buffers from user mode to kernel mode.
The first, easier, but less efficient way, is called Buffered IO, and
consists in the WDM core copying the user mode buffer to a kernel mode
buffer, and then passing it to the driver. When the driver is done, WDM core
copies back the results out of the kernel mode buffer into the user buffer.
This uses the "TransferBuffer" field.
The second, more efficient way, is called Direct IO. In that model, the user
mode application passes its buffer(s), and the WDM core sets up a MDL
(memory descriptor list), which refers to the user mode pages. When the WDM
driver wants to access the buffer, it needs to tell the WDM core to map
those pages into its own memory space. So, there's no copying of data, just
modification of the page tables.

The reason that USB Snoopy prints both is purely for debugging. In the
beginning, I wasn't quite sure how to deal with MDLs, and so I printed their
address for my own debugging purposes. If you look at the filter's code now,
it determines whether the user data is copied using "Buffered IO" or refered
to using "Direct IO", and retrieves the data using either one or the other
method and prints it in the buffer contents field which follows the header.

Hope this helps,
..tom

> ----- Original Message -----
> From: Eric HENRY
> To: Usb-Devel (E-mail)
> Sent: Monday, March 26, 2001 5:50 AM
> Subject: [linux-usb-devel] What is TransferBufferMDL ?
>
>
> Hi,
> Anyone knows what is the "TransferBufferMDL" field found in
> USB Snoopy logs and how I can get it from the device under
> Linux ?
> In fact, I don't know to what it correspond under Linux since
> in an Urb there is only the "transfer buffer", but when I send a
> command (a vendor one, not a get descriptor...) that is to fill
> this "TransferBufferMDL" under Windows I can't get it under
> Linux...
> If someone could help me to understand what is this TransferBufferMDL
> I should then manage to solve my problem.
> Thanks,
> Eric HENRY


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to