From: uba on
Hi All,

Is the USB mass storage driver architecure modified from Windows XP to
Windows Vista/Win 7. I transfer a block size of 1MB from an app, and
in my USBSTOR lower filter I see the bytecount (MmGetMdlByteCount) of
MDL address to be 1MB in Windows XP while it is 64K in Vista and Win
7.

If I want the retrieve the virtual address for the buffer using
MmGetSystemAddressForMdlSafe(), Will I get virtual
address of complete 1MB or is it only 64K. In XP I get the virtual
address of 1MB. I would like to know it for Windows Vista and Win 7.

Any information is much appreciated.

Thanks and Regards,
Kid
From: Scott Noone on
You shouldn't be getting the transfer length out of the ByteCount field of
the MDL, you should be getting it out of the URB in this case. The ByteCount
of the MDL will be >= to the actual length of the transfer.

-scott

--
Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com


"uba" <kid07.uba(a)gmail.com> wrote in message
news:3a5b3453-3a05-4745-9d6f-dd87c59dbbea(a)q2g2000pre.googlegroups.com...
> Hi All,
>
> Is the USB mass storage driver architecure modified from Windows XP to
> Windows Vista/Win 7. I transfer a block size of 1MB from an app, and
> in my USBSTOR lower filter I see the bytecount (MmGetMdlByteCount) of
> MDL address to be 1MB in Windows XP while it is 64K in Vista and Win
> 7.
>
> If I want the retrieve the virtual address for the buffer using
> MmGetSystemAddressForMdlSafe(), Will I get virtual
> address of complete 1MB or is it only 64K. In XP I get the virtual
> address of 1MB. I would like to know it for Windows Vista and Win 7.
>
> Any information is much appreciated.
>
> Thanks and Regards,
> Kid

From: uba on

> You shouldn't be getting the transfer length out of the ByteCount field of
> the MDL, you should be getting it out of the URB in this case. The ByteCount
> of the MDL will be >= to the actual length of the transfer.
>

Yes, the bytecount of mdl is always greater than actual transfer
length in XP. In Vista bytecount is always equal to transfer length.
This is when I transfer a block greater than 64K.

I was able to retrieve complete 1MB virtual address in XP using
bytecount, but not in Vista.
From: Scott Noone on
Then it sounds like the Vista USBSTOR is probably building partial MDLs and
sending the one large request down in smaller chunks using the partials. Not
really much you can do about that, it's architecturally correct behavior.
Your old code just worked because of an implementation detail of the older
USBSTOR.

-scott

--
Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com


"uba" <kid07.uba(a)gmail.com> wrote in message
news:1159874a-3f14-49fa-b9f6-98f755c6873c(a)s36g2000prh.googlegroups.com...
>
>> You shouldn't be getting the transfer length out of the ByteCount field
>> of
>> the MDL, you should be getting it out of the URB in this case. The
>> ByteCount
>> of the MDL will be >= to the actual length of the transfer.
>>
>
> Yes, the bytecount of mdl is always greater than actual transfer
> length in XP. In Vista bytecount is always equal to transfer length.
> This is when I transfer a block greater than 64K.
>
> I was able to retrieve complete 1MB virtual address in XP using
> bytecount, but not in Vista.

From: Alexander Grigoriev on
Why do you care about MDL bytecount? If you're given bytecount in URB, you
can only use that.

"uba" <kid07.uba(a)gmail.com> wrote in message
news:1159874a-3f14-49fa-b9f6-98f755c6873c(a)s36g2000prh.googlegroups.com...
>
>> You shouldn't be getting the transfer length out of the ByteCount field
>> of
>> the MDL, you should be getting it out of the URB in this case. The
>> ByteCount
>> of the MDL will be >= to the actual length of the transfer.
>>
>
> Yes, the bytecount of mdl is always greater than actual transfer
> length in XP. In Vista bytecount is always equal to transfer length.
> This is when I transfer a block greater than 64K.
>
> I was able to retrieve complete 1MB virtual address in XP using
> bytecount, but not in Vista.


 |  Next  |  Last
Pages: 1 2
Prev: Build Enviroments?
Next: KbFiltr questions