Closed Zibri closed 1 year ago
Ok.. my bad... As stated in sg_pt_win32.c:
- N.B. MSDN says that the "SPT" interface (i.e. double buffered)
- should be used for small amounts of data (it says "< 16 KB").
- The direct variant (i.e. IOCTL_SCSI_PASS_THROUGH_DIRECT) should
- be used for larger amounts of data but the buffer needs to be
- "cache aligned". Is that 16 byte alignment or greater?
So for 32k to work, it must be compiled WITHOUT --enable-win32-spt-direct or with --disable-win32-spt-direct
sg_raw -r 32K or -r 32768 fails on windows while -r 32767 works.
There must be some int/uint problem before the deviceiocontrol The same command works on cygwin.
I checked the code of wg_raw and the problem does not seem to be there.. perhaps it's in the library... I'll check further and let you know.