The ScsiPortLogError routine logs errors to the system event log when a miniport driver or its HBA detects a SCSI error condition.
VOID ScsiPortLogError( _In_ PVOID HwDeviceExtension, _In_opt_ PSCSI_REQUEST_BLOCK Srb, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun, _In_ ULONG ErrorCode, _In_ ULONG UniqueId );
- HwDeviceExtension [in]
Pointer to the hardware device extension. This is a per-HBA storage area that the port driver allocates and initializes on behalf of the miniport driver. Miniport drivers usually store HBA-specific information in this extension, such as the state of the HBA and the HBA's mapped access ranges. This area is available to the miniport driver in the DeviceExtension->HwDeviceExtension member of the HBA's device object immediately after the miniport driver calls ScsiPortInitialize. The port driver frees this memory when it removes the device.
- Srb [in, optional]
Pointer to a SCSI request block if one is associated with the error. Otherwise, this parameter is NULL.
- PathId [in]
Identifies the SCSI bus.
- TargetId [in]
Identifies the target controller or device on the bus.
- Lun [in]
Identifies the logical unit number of the target device.
- ErrorCode [in]
Specifies an error code indicating one of the following values as the type of error.
Indicates the driver has detected bad or old firmware. The device will not be used.
Indicates the driver has detected a card with old or bad firmware, which can result in reduced performance or functionality.
Indicates a SCSI bus parity error was detected.
Indicates a SCSI bus connection to a logical unit timed out.
Indicates an internal HBA error was detected.
Indicates a logical unit reselected unexpectedly or with an invalid queue tag.
Indicates the HBA is not interrupting when expected.
Indicates the miniport driver detected a SCSI bus protocol error.
Indicates an operation to the controller has timed out.
Indicates that a target disconnected unexpectedly.
- UniqueId [in]
Specifies a unique identifier for the error. This value differentiates the current error from other errors with the same ErrorCode. For some miniport drivers, this identifies the line of code where the error was detected. For others, it is additional information returned by the HBA.
A miniport driver should log all real hardware errors. However, it should not log common operational errors, such as selection time-outs or bus resets.
Build date: 2/12/2014