The information in this article applies to:
SYMPTOMSWhen transferring data via the SCSI passthrough (IOCTL_SCSI_PASS_THROUGH and IOCTL_SCSI_PASS_THROUGH_DIRECT), a transfer larger than the targeted SCSI host bus adapter (HBA) can support may crash the system. CAUSEThe SCSI port driver is not checking that the requested data transfer can be safely handled by the SCSI HBA. RESOLUTION
The Win32 application must ensure that SCSI passthrough data transfers can
be safely handled by the HBA before sending them to the SCSI port driver.
To do so, the application should first make a call to get the capabilities
of the SCSI HBA. This is done with a call to DeviceIoControl with an IOCTL
of IOCTL_SCSI_GET_CAPABILITIES.
Before each transfer, the application should ensure that the requested transfer does not exceed either the SCSI HBA MaximumTransferLength nor the MaximumPhysicalPages. If the transfer is too large, the application should split the request into two (or more) smaller requests. Calculating the maximum transfer sizeThe simplest thing to do is to multiply the MaximumPhysicalPages value by the page size for the machine. The requested transfer size should equal the result or the MaximumTransferLength, whichever is smaller.In other words, the requested transfer size should equal the smaller of:
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was resolved in Windows NT version 3.51. REFERENCES
There is a sample program on the DDK CD, called SPTI (SCSI Pass Through
Interface) that demonstrates a lot of the concepts discussed in this
article. Currently, the files for this sample are on the DDK CD in:
\q_a\samples\ddk\sptiThese files are not automatically copied to the users hard disk during installation of the DDK -- they must be copied manually. Additional query words: 3.50 memory buffering
Keywords : ntddkstorage |
Last Reviewed: March 4, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |