doug-gilbert/sg3_utils

Something weird happened in windows... please help me understand.

Zibri opened this issue · 3 comments

Zibri commented

Until a few days ago I could issue this command:

# sg_raw -r 1k $dev 88 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00
# # as well as this command
# sg_raw -r 32k $dev 88 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00

In other words I could read the first kilobyte or the first 32 kilobytes starting from LBA 0.

Since a few days, instead, I can read anything in the range of 512-16384 bytes. Anything more than that and I get:

>>> transport error: The parameter is incorrect.

I am using windows 10.
I don't know if it was some system update or something else but I am sure this happened to someone else.
Can you please help me understand?
SG3_UTILS is one of the few programs that used to work flawlessly both on windows both on linux.

P.S.
I have the same behaviour both in CYGWIN both in MSYS.
It must be something in the system but I don't know what.
I uninstalled all usb filters or anything related.

Note: this happens with ANY command... not only reading a sector.
It's like the receive buffer is capped at 32k.

Obviously, in linux the same commands work with receive buffer >32K as usual.

Zibri commented

UPDATE:

It was not windows fault.
Before I was using sg3_utils 1.42

I recompiled that and it works.
It seems to work until 1.46 (perhaps also 1.47)

Zibri commented

Nevermind. I found the reason.
I forgot to put --enable-win32-spt-direct in configure!

Zibri commented

Just a quick hint, put that as default with an ifdef WIN32 or CYGWIN...