A.1.5.2 SCSI Class Driver's InterpretRequestSense Routine
An InterpretRequestSense routine interprets the data returned in the SrbSenseInfoBuffer, determines whether the request should be retried, and, if not, maps the error to an NTSTATUS value for the IRP's I/O status block.
The system port driver indicates whether request-sense information is available by setting the SrbStatus member with SRB_STATUS_AUTOSENSE_VALID or SRB_STATUS_REQUEST_SENSE_FAILED.
If no request-sense information is available, InterpretRequestSense should check the SrbStatus value to determine whether to retry a given request or to determine an appropriate mapping to an NTSTATUS value.
The InterpretRequestSense routine might call a driver-supplied error-logging routine, as well. Whenever a SCSI class driver logs an I/O error, it should include the PathId, TargetId, Lun, and SrbStatus values from the SRB, and, if possible, pertinent request-sense information as part of the error log entry's DumpData.
For more information about logging I/O errors, see Chapter 16.