A.4.11 Error Handling in SCSI Miniport Drivers

Every SCSI miniport driver is responsible for handling and for notifying the system port driver of the following kinds of SCSI errors, which should be set in the SrbStatus member before the driver completes the SRB it was processing when the error occurred:

For a data underrun, the miniport driver must update the SRB’s DataTransferLength to indicate how much data actually was transferred.

In addition, the miniport driver should log some of the preceding errors by passing the SRB to ScsiPortLogError, according to the following guidelines:

To log an error, a miniport driver calls ScsiPortLogError with one of the following system-defined error or warning codes:

ScsiPortLogError allocates an error-log packet, sets it up, and logs the I/O error in the Windows NT event log on behalf of the miniport driver. System administrators or users can monitor the condition of an HBA by examining the system event log and, if necessary, reconfigure, repair, or replace the HBA before it fails.