IOCTL_SCSI_PASS_THROUGH question

Should IOCTL_SCSI_PASS_THROUGH allow a 0 byte data transfer reads/writes?
Should the Port driver return a success or error if the user app sent a 0
byte DataTransferLength?

Thanks,
Satyeshwar

Certainly this is allowed. It is up to the target how to respond to such a
request. Note that a zero length read-6 request for disk devices is actually
a request to transfer 256 blocks, while a zero length read-10 request
indicates a zero length read, and should succeed. I have no idea what
happens if your send a read-6 that indicates zero blocks with a zero length
data transfer buffer, but it ought to resemble either: a) an overrun error,
or b) a BSOD :slight_smile:

Write and write-6 are similar to the read commands.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Satyeshwar Singh
Sent: Tuesday, December 16, 2003 6:17 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] IOCTL_SCSI_PASS_THROUGH question

Should IOCTL_SCSI_PASS_THROUGH allow a 0 byte data transfer
reads/writes?
Should the Port driver return a success or error if the user
app sent a 0 byte DataTransferLength?

Thanks,
Satyeshwar


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as:
xxxxx@hollistech.com To unsubscribe send a blank email to
xxxxx@lists.osr.com

Talking to the storage team, it seems like the safest thing for you to
do (ie. The thing that’s most likely to work :slight_smile: is to send the request
without either transfer-direction flag set. This is the clearest
indication that there’s no data buffer and should avoid some of the
validation code that won’t like a zero-length buffer.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Roddy
Sent: Tuesday, December 16, 2003 5:12 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] RE: IOCTL_SCSI_PASS_THROUGH question

Certainly this is allowed. It is up to the target how to respond to such
a request. Note that a zero length read-6 request for disk devices is
actually a request to transfer 256 blocks, while a zero length read-10
request indicates a zero length read, and should succeed. I have no idea
what happens if your send a read-6 that indicates zero blocks with a
zero length data transfer buffer, but it ought to resemble either: a) an
overrun error, or b) a BSOD :slight_smile:

Write and write-6 are similar to the read commands.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Satyeshwar Singh
Sent: Tuesday, December 16, 2003 6:17 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] IOCTL_SCSI_PASS_THROUGH question

Should IOCTL_SCSI_PASS_THROUGH allow a 0 byte data transfer
reads/writes?
Should the Port driver return a success or error if the user app sent
a 0 byte DataTransferLength?

Thanks,
Satyeshwar


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as:
xxxxx@hollistech.com To unsubscribe send a blank email to
xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com