This message is from the T13 list server.
I have another soft trace to contribute, though I'm not yet caught up on all the
e-mail.
To speak concisely, I'll adopt a convention from elsewhere:
H = byte count host asks to copy
C = max byte count Cdb allows
D = byte count device asks to copy
H = C = D does Not just plain work in Win XP, not for Atapi. At least in the one
counterexample below, when H = C = D but H is odd, Win XP behaves as if H were H - 1,
and quietly discards the last byte of D.
Increment H without changing C, thus presumably without changing D, and lookathat, an
extra byte passes thru.
I find this disturbing. First because it's a case where TalkLikeWindows doesn't bless
H = C = D. Also because I know of driver stacks that try to save time by copying only
the bytes that pass thru. A stack that applies this optimisation sometimes but not
always will end up leaving the last byte of H completely undetermined i.e. neither
copied from the device nor reliably equal to the value it had before the pass thru
began.
Happy Friday, Pat LaVarre
P.S. In every test, as expected for Win Atapi, we see a false report of H bytes
copied. (That is, we know we saw SCSI_PASS_THROUGH.DataTransferLength pass back
unchanged, because we see the "main exit int" is zero.)
P.P.S. Here now is the soft trace. C is at offset 4 in the -x $cdb. H is the -i arg.
The plscsi -d option asks for a trace of data before and after the pass thru,
overriding the just-after default for -i. To repeat this experiment, you can get
plscsi in source or .exe at:
http://members.aol.com/plscsi/
D:\>ver
Microsoft Windows XP [Version 5.1.2600]
D:\>plscsi \\.\E: -v -x "12 0 0 0 06 0" -i x6 -d x8
x 00000000 12 00:00:00 06 00 .. .. .. .. .. .. .. .. .. .. "R@@@F@"
x 00000000 AE:AE:AE:AE AE:AE:AE:AE .. .. .. .. .. .. .. .. "........"
x 00000000 05:80:00:31 5B:00:AE:AE .. .. .. .. .. .. .. .. "E@@1[@.."
// 0 = plscsi.main exit int
D:\>plscsi \\.\E: -v -x "12 0 0 0 05 0" -i x6 -d x8
x 00000000 12 00:00:00 05 00 .. .. .. .. .. .. .. .. .. .. "R@@@E@"
x 00000000 AE:AE:AE:AE AE:AE:AE:AE .. .. .. .. .. .. .. .. "........"
x 00000000 05:80:00:31 5B:00:AE:AE .. .. .. .. .. .. .. .. "E@@1[@.."
// 0 = plscsi.main exit int
D:\>plscsi \\.\E: -v -x "12 0 0 0 05 0" -i x5 -d x8
x 00000000 12 00:00:00 05 00 .. .. .. .. .. .. .. .. .. .. "R@@@E@"
x 00000000 AE:AE:AE:AE AE:AE:AE:AE .. .. .. .. .. .. .. .. "........"
x 00000000 05:80:00:31 AE:AE:AE:AE .. .. .. .. .. .. .. .. "E@@1...."
// 0 = plscsi.main exit int
D:\>