ScsiPortLogError

VOID
    ScsiPortLogError(

        IN PVOID  HwDeviceExtension,
        IN PSCSI_REQUEST_BLOCK  Srb,            /* optional */
        IN UCHAR  PathId,
        IN UCHAR  TargetId,
        IN UCHAR  Lun,
        IN ULONG  ErrorCode,
        IN ULONG  UniqueId
        );

ScsiPortLogError logs errors to the system event log when a miniport driver or its HBA detects a SCSI error condition.

Parameters

HwDeviceExtension
Points to the miniport driver’s per-HBA storage area.
Srb
Points to a SCSI request block if one is associated with the error. Otherwise, this parameter is NULL.
PathId
Identifies the SCSI bus.
TargetId
Identifies the target controller or device on the bus.
Lun
Identifies the logical unit number of the target device.
ErrorCode
Specifies an error code indicating one of the following values as the type of error:

Values

Meaning

SP_PROTOCOL_ERROR

Indicates the miniport driver detected a SCSI bus protocol error.

SP_BUS_PARITY_ERROR

Indicates a SCSI bus parity error was detected.

SP_INTERNAL_ADAPTER_ERROR

Indicates an internal HBA error was detected.

SP_UNEXPECTED_DISCONNECT

Indicates that a target disconnected unexpectedly.

SP_INVALID_RESELECTION

Indicates a logical unit reselected unexpectedly or with an invalid queue tag.

SP_BUS_TIME_OUT

Indicates a SCSI bus connection to a logical unit timed out.

SP_REQUEST_TIMEOUT

Indicates an operation to the controller has timed out.

SP_IRQ_NOT_RESPONDING

Indicates the HBA is not interrupting when expected.

SP_BAD_FW_ERROR

Indicates the driver has detected bad or old firmware. The device will not be used.

SP_BAD_FW_WARNING

Indicates the driver has detected a card with old or bad firmware, which can result in reduced performance or functionality.

UniqueId
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.

Comments

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 it detects.

See Also

ScsiPortNotification