Hi!
Very very very interesting… This is what I have in my SCSI-2 spec:
“The transfer length field specifies the number of contiguous logical
blocks of data that shall be transferred. A transfer
length of zero indicates that no logical blocks shall be transferred. This
condition shall not be considered an error.
Any other value indicates the number of logical blocks that shall be
transferred.”
It looks like we have different SCSI-2 specs -) BTW, ->DataTransferLength
in described case was also 0 and SCSI miniport was reporting of capable
only of 64KB transfers. It will be very strange if someone will try to
read 128KB in this situation.
Regards,
Anton A. Kolomyeytsev
“The transfer length field specifies the number of contiguous logical
blocks
of data to be transferred. A transfer length of zero indicates that 256
logical blocks shall be transferred. Any other value indicates the number
of
logical blocks that shall be transferred.”
Thus spake scsi-2.
-----Original Message-----
From: Jamey Kirby [mailto:xxxxx@storagecraft.com]
Sent: Tuesday, August 13, 2002 12:32 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Win2k SCSI Miniport driver
I must disagree with this. Here is a snippet from a miniport
driver I wrote several years ago.
// Setup the context.
luExtension->Srb = Srb;
luExtension->DataPointer = Srb->DataBuffer;
luExtension->DataLength = Srb->DataTransferLength;
I always get the transfer length from he Srb and this driver
has had zero bugs since it was written; at least none have
been reported 
In subsequent code, I use the luExtension->DataLength for DMA
transfer sizes.
Jamey
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On > Behalf Of Anton
Kolomyeytsev
Sent: Tuesday, August 13, 2002 7:19 AM
To: NT Developers Interest List
Subject: [ntdev] Re: Win2k SCSI Miniport driver
Hi!
You need always decode CDB and extract the transfer length
from it. Make sure you have enogh memory in user’s (it’s not
usually) data buffer. Transfer lengths of 0 are normal. Just
return success.
Anton
> I am working on a Win2k SCSI Miniport driver. After
getting called in
the
> DriverEntry, FindAdapter and InitializeAdapter I am getting calls to
the
> StartIO routine for a Read SRB (0x28)which have a block# of
0, number
of
> blocks of 0 in the CDB but a DataTransferLength that is non-zero
(usually
> 32K).
>
> Which is correct - are there 0 block reads that have the
> DataTransferLength set or is the # blocks field in the CDB
incorrect
> in which case do I
need
> to calculate the correct number of blocks using the
DataTransferLength?
>
> Thanks for any help.
You are currently subscribed to ntdev as:
xxxxx@storagecraft.com To unsubscribe send a blank email to
%%email.unsub%%
You are currently subscribed to ntdev as:
xxxxx@stratus.com To unsubscribe send a blank email to
%%email.unsub%%